01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SYSTEM ( 3S ) SYSTEM( 3S )<br />

NAME<br />

system - issue a shell command<br />

SYNOPSIS<br />

#include <br />

int system (string)<br />

char •string;<br />

DESCRIPTION<br />

<strong>System</strong> causes the string to be given to sh(l) as input, as if the<br />

string had been typed as a command at a terminal. The current<br />

process waits until the shell has completed, then returns the exit<br />

status of the shell.<br />

FILES<br />

/bin/sh<br />

SEE ALSO<br />

sh(l), exec(2).<br />

DIAGNOSTICS<br />

<strong>System</strong> forks to create a child process that in turn exec's /bin/ sh<br />

in order to execute string . If the fork or exec fails, system returns<br />

- 1 and sets errno.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!