72 lines
1.1 KiB
HTML
72 lines
1.1 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>system(3)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>system(3)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
system - issue a shell command
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>#include</STRONG> <STRONG><stdlib.h></STRONG>
|
|
|
|
<STRONG>int</STRONG> <STRONG>system(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>string</EM><STRONG>)</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>System</STRONG> causes the <EM>string</EM> to be given to <STRONG><A HREF="../man1/sh.1.html">sh(1)</A></STRONG> as input as if the string
|
|
had been typed as a command at a terminal. The current process waits
|
|
until the shell has completed, then returns the exit status of the shell.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man1/sh.1.html">sh(1)</A></STRONG>, <STRONG><A HREF="../man3/popen.3.html">popen(3)</A></STRONG>, <STRONG><A HREF="../man2/execve.2.html">execve(2)</A></STRONG>, <STRONG><A HREF="../man2/wait.2.html">wait(2)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>DIAGNOSTICS</H2><PRE>
|
|
Exit status 127 indicates the shell couldn't be executed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|