소스 검색

+ Added Shell function entry

michael 27 년 전
부모
커밋
8244866fca
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      docs/linux.tex

+ 12 - 0
docs/linux.tex

@@ -636,6 +636,18 @@ process. (you can get the parent's PID with \seef{GetPPid}).
 
 \input{linuxex/ex14.tex}
 
+\function{Shell}{(Command : String)}{Longint}
+{\var{Shell} invokes the bash shell (\file{/bin/sh}), and feeds it the
+command \var{Command} (using the \var{-c} option). The function then waits
+for the command to complete, and then returns the exit
+status of the command, or 127 if it could not complete the \seef{Fork} 
+or \seep{Execve} calls.
+}
+{Errors are reported in LinuxError.}
+{\seep{POpen}, \seef{Fork}, \seep{Execve}, \seem{system}{3}}
+
+\input{linuxex/ex56.tex}
+
 \procedure{Nice}{( N : Integer)}
 {Nice adds \var{-N} to the priority of the running process. The lower the
 priority numerically, the less the process is favored.