diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111.dita --- a/Symbian3/PDK/Source/GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,31 +1,31 @@ - - - - - -External Programs

External programs are executables built outside but which can be launched from the Zsh command prompt.

If the command is neither built-in, nor specified with an absolute pathname, the shell will look in the \sys\bin on each drive in reverse alphabetical order (y:, x:,... to b:, a: and later z:) and execute the first external program found.

To execute the external program directly give the following command at the command-prompt:

command <ext_pgm>

where ext_pgm is the name of the external program.

For example:

The program below reads input from Zsh and writes data to Zsh which can then be redirected back to the Telnet client.

#include <stdio.h> -#include <string.h> -#include <unistd.h> - -int main() - { - char userData[20]; char ch; int x=0; - - memset(userData,0,20); - x=read(0,userData, 20); - - while(strcmp(userData, "quit")) - { - write(1, userData, x); - memset(userData,0,20); - x=read(0,userData, 20); - } - return 0; - } + + + + + +External Programs

External programs are executables built outside but which can be launched from the Zsh command prompt.

If the command is neither built-in, nor specified with an absolute pathname, the shell will look in the \sys\bin on each drive in reverse alphabetical order (y:, x:,... to b:, a: and later z:) and execute the first external program found.

To execute the external program directly give the following command at the command-prompt:

command <ext_pgm>

where ext_pgm is the name of the external program.

For example:

The program below reads input from Zsh and writes data to Zsh which can then be redirected back to the Telnet client.

#include <stdio.h> +#include <string.h> +#include <unistd.h> + +int main() + { + char userData[20]; char ch; int x=0; + + memset(userData,0,20); + x=read(0,userData, 20); + + while(strcmp(userData, "quit")) + { + write(1, userData, x); + memset(userData,0,20); + x=read(0,userData, 20); + } + return 0; + }
Limitations

P.I.P.S. applications and native Symbian applications can be launched from the Telnet client. However, to view the output of the program or interact with it, the standard input and output of the program must be accessible to the Telnet server. This is only possible with P.I.P.S. applications. With native applications you will only be able to retrieve the termination status; you will not be able to view the output or interact with the program.

Permission will be denied for external programs that does not have the required capabilities to access directories that contain /sys and /private in their directory path.

Note: For more information about the external commands supported by Zsh, see the Zsh Command Syntax section.

See also

For information on porting Standard C applications to Symbian platform see the P.I.P.S. Guide.

\ No newline at end of file