Symbian3/PDK/Source/GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111"><title>External Programs</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>External programs are executables built outside but which can be launched from the Zsh command prompt. </p> <p>If the command is neither built-in, nor specified with an absolute pathname, the shell will look in the <filepath>\sys\bin</filepath> on each drive in reverse alphabetical order (<filepath>y:</filepath>, <filepath>x:</filepath>,... to <filepath>b:</filepath>, <filepath>a:</filepath> and later <filepath>z:</filepath>) and execute the first external program found. </p> <p>To execute the external program directly give the following command at the command-prompt: </p> <p><userinput>command &lt;ext_pgm&gt;</userinput> </p> <p>where <codeph>ext_pgm</codeph> is the name of the external program. </p> <p>For example: </p> <p>The program below reads input from Zsh and writes data to Zsh which can then be redirected back to the Telnet client. </p> <codeblock id="GUID-2A92BFF9-D69D-5C18-B657-9D7D5738EA22" xml:space="preserve">#include &lt;stdio.h&gt;
    12 <concept id="GUID-00FFF2B3-F8E4-5CBF-B031-240D98BB2111" xml:lang="en"><title>External
       
    13 Programs</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>External programs are executables built outside but which can be launched
       
    15 from the Zsh command prompt. </p>
       
    16 <p>If the command is neither built-in, nor specified with an absolute pathname,
       
    17 the shell will look in the <filepath>\sys\bin</filepath> on each drive in
       
    18 reverse alphabetical order (<filepath>y:</filepath>, <filepath>x:</filepath>,...
       
    19 to <filepath>b:</filepath>, <filepath>a:</filepath> and later <filepath>z:</filepath>)
       
    20 and execute the first external program found. </p>
       
    21 <p>To execute the external program directly give the following command at
       
    22 the command-prompt: </p>
       
    23 <p><userinput>command &lt;ext_pgm&gt;</userinput> </p>
       
    24 <p>where <codeph>ext_pgm</codeph> is the name of the external program. </p>
       
    25 <p>For example: </p>
       
    26 <p>The program below reads input from Zsh and writes data to Zsh which can
       
    27 then be redirected back to the Telnet client. </p>
       
    28 <codeblock id="GUID-2A92BFF9-D69D-5C18-B657-9D7D5738EA22" xml:space="preserve">#include &lt;stdio.h&gt;
    13 #include &lt;string.h&gt;
    29 #include &lt;string.h&gt;
    14 #include &lt;unistd.h&gt;
    30 #include &lt;unistd.h&gt;
    15 
    31 
    16 int  main()
    32 int  main()
    17     {
    33     {
    26         memset(userData,0,20);
    42         memset(userData,0,20);
    27         x=read(0,userData, 20);        
    43         x=read(0,userData, 20);        
    28         }        
    44         }        
    29     return 0;                 
    45     return 0;                 
    30     }
    46     }
    31 </codeblock> <section><title>Limitations</title> <p>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. </p> <p>Permission will be denied for external programs that does not have the required capabilities to access directories that contain <filepath>/sys</filepath> and <filepath>/private</filepath> in their directory path. </p> <p> <b>Note:</b> For more information about the external commands supported by Zsh, see the <xref href="GUID-3F577531-9798-537F-8F8B-7CAB0257560C.dita">Zsh Command Syntax</xref> section. </p> </section> <section><title>See also</title> <p>For information on porting Standard C applications to Symbian platform see the <xref href="GUID-E2DE2C6F-E071-5E88-96F1-D71DDED84609.dita">P.I.P.S. Guide</xref>. </p> </section> </conbody></concept>
    47 </codeblock>
       
    48 <section id="GUID-A2C89E91-C5A5-49D9-A3A5-E9FB54A01BE1"><title>Limitations</title> <p>P.I.P.S. applications and native Symbian
       
    49 applications can be launched from the Telnet client. However, to view the
       
    50 output of the program or interact with it, the standard input and output of
       
    51 the program must be accessible to the Telnet server. This is only possible
       
    52 with P.I.P.S. applications. With native applications you will only be able
       
    53 to retrieve the termination status; you will not be able to view the output
       
    54 or interact with the program. </p> <p>Permission will be denied for external
       
    55 programs that does not have the required capabilities to access directories
       
    56 that contain <filepath>/sys</filepath> and <filepath>/private</filepath> in
       
    57 their directory path. </p> <p> <b>Note:</b> For more information about the
       
    58 external commands supported by Zsh, see the <xref href="GUID-3F577531-9798-537F-8F8B-7CAB0257560C.dita">Zsh
       
    59 Command Syntax</xref> section. </p> </section>
       
    60 <section id="GUID-164C2D77-8150-41FB-ABAB-FA1C52A59E21"><title>See also</title> <p>For information on porting Standard C
       
    61 applications to the Symbian platform see the <xref href="GUID-E2DE2C6F-E071-5E88-96F1-D71DDED84609.dita">P.I.P.S.
       
    62 Guide</xref>. </p> </section>
       
    63 </conbody></concept>