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;
    x=read(0,userData, 20);    
    while(strcmp(userData, "quit"))
        write(1, userData, x);
        x=read(0,userData, 20);        
    return 0;                 


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 the Symbian platform see the P.I.P.S. Guide.