📄 shelllib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/shellLib.html - generated by refgen from shellLib.c --> <title> shellLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>shellLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellLib</strong> - shell execution routines </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./shellLib.html#shellInit">shellInit</a>( )</b> - start the shell<br><b><a href="./shellLib.html#shell">shell</a>( )</b> - the shell entry point<br><b><a href="./shellLib.html#shellScriptAbort">shellScriptAbort</a>( )</b> - signal the shell to stop processing a script<br><b><a href="./shellLib.html#shellHistory">shellHistory</a>( )</b> - display or set the size of shell history<br><b><a href="./shellLib.html#shellPromptSet">shellPromptSet</a>( )</b> - change the shell prompt<br><b><a href="./shellLib.html#shellOrigStdSet">shellOrigStdSet</a>( )</b> - set the shell's default input/output/error file descriptors<br><b><a href="./shellLib.html#shellLock">shellLock</a>( )</b> - lock access to the shell<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains the execution support routines for the VxWorks shell.It provides the basic programmer's interface to VxWorks.It is a C-expression interpreter, containing no built-in commands.<p>The nature, use, and syntax of the shell are more fully described inthe "Target Shell" chapter of the<i>VxWorks Programmer's Guide. </i><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>shellLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ledLib.html#top">ledLib</a></b>,<i>VxWorks Programmer's Guide: Target Shell </i><hr><a name="shellInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellInit( )</strong> - start the shell</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS shellInit ( int stackSize, /* shell stack (0 = previous/default value) */ int arg /* argument to shell task */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine starts the shell task. If the configuration macro <b>INCLUDE_SHELL</b>is defined, <b><a href="./shellLib.html#shellInit">shellInit</a>( )</b> is called by the root task, <b><a href="./usrConfig.html#usrRoot">usrRoot</a>( )</b>, in <b>usrConfig.c</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="shell"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shell( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shell( )</strong> - the shell entry point</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void shell ( BOOL interactive /* should be TRUE, except for a script */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is the shell task. It is started with a single parameterthat indicates whether this is an interactive shell to be used from aterminal or a socket, or a shell that executes a script.<p>Normally, the shell is spawned in interactive mode by the root task,<b><a href="./usrConfig.html#usrRoot">usrRoot</a>( )</b>, when VxWorks starts up. After that, <b><a href="./shellLib.html#shell">shell</a>( )</b> is called onlyto execute scripts, or when the shell is restarted after an abort.<p>The shell gets its input from standard input and sends output to standardoutput. Both standard input and standard output are initially assignedto the console, but are redirected by <b>telnetdTask( )</b> and <b>rlogindTask( )</b>.<p>The shell is not reentrant, since <b>yacc</b> does not generate areentrant parser. Therefore, there can be only a single shell executingat one time.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="shellScriptAbort"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellScriptAbort( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellScriptAbort( )</strong> - signal the shell to stop processing a script</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void shellScriptAbort (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine signals the shell to abort processing a script file.It can be called from within a script if an error is detected.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="shellHistory"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellHistory( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellHistory( )</strong> - display or set the size of shell history</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void shellHistory ( int size /* 0 = display, >0 = set history to new size */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays shell history, or resets the default number ofcommands displayed by shell history to <i>size</i>. By default, history sizeis 20 commands. Shell history is actually maintained by <b><a href="./ledLib.html#top">ledLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <b><a href="./ledLib.html#top">ledLib</a></b>, <b><a href="./usrLib.html#h">h</a>( )</b>, <i>VxWorks Programmer's Guide: Target Shell, </i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>, <i>Tornado User's Guide: Shell</i><hr><a name="shellPromptSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellPromptSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellPromptSet( )</strong> - change the shell prompt</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void shellPromptSet ( char * newPrompt /* string to become new shell prompt */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine changes the shell prompt string to <i>newPrompt</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell, </i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>, <i>Tornado User's Guide: Shell</i><hr><a name="shellOrigStdSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellOrigStdSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellOrigStdSet( )</strong> - set the shell's default input/output/error file descriptors</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void shellOrigStdSet ( int which, /* STD_IN, STD_OUT, STD_ERR */ int fd /* fd to be default */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called to change the shell's default standardinput/output/error file descriptor. Normally, it is used only by theshell, <b>rlogindTask( )</b>, and <b>telnetdTask( )</b>. Values for <i>which</i> can be<b>STD_IN</b>, <b>STD_OUT</b>, or <b>STD_ERR</b>, as defined in <b>vxWorks.h</b>. Values for <i>fd</i> canbe the file descriptor for any file or device.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b><hr><a name="shellLock"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>shellLock( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>shellLock( )</strong> - lock access to the shell</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BOOL shellLock ( BOOL request /* TRUE = lock, FALSE = unlock */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine locks or unlocks access to the shell. When locked, cooperatingtasks, such as <b>telnetdTask( )</b> and <b>rlogindTask( )</b>, will not take the shell.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>TRUE if <i>request</i> is "lock" and the routine successfully locks the shell,otherwise FALSE. TRUE if <i>request</i> is "unlock" and the routinesuccessfully unlocks the shell, otherwise FALSE.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./shellLib.html#top">shellLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -