Commit | Line | Data |
---|---|---|
a83c1154 KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" %sccs.include.redist.man% | |
5 | .\" | |
6 | .\" @(#)system.3 6.2 (Berkeley) %G% | |
6363d9ff | 7 | .\" |
929cacff | 8 | .TH SYSTEM 3 "" |
6363d9ff KM |
9 | .AT 3 |
10 | .SH NAME | |
11 | system \- issue a shell command | |
12 | .SH SYNOPSIS | |
13 | .nf | |
a83c1154 KB |
14 | .ft B |
15 | system(const char *string); | |
16 | .ft R | |
6363d9ff KM |
17 | .fi |
18 | .SH DESCRIPTION | |
19 | .I System | |
a83c1154 | 20 | hands |
6363d9ff | 21 | .I string |
a83c1154 KB |
22 | to the command interpreter |
23 | .IR sh (1). | |
24 | The calling process waits until the shell has completed, | |
25 | ignoring SIGINT and SIGQUIT, and blocking SIGCHLD. | |
26 | .PP | |
27 | If | |
28 | .I string | |
29 | is a NULL pointer, | |
30 | .I system | |
31 | will return non-zero if the command interpreter | |
32 | .IR sh (1) | |
33 | is available, and zero if it is not. | |
34 | .PP | |
35 | .I System | |
36 | returns the exit status of the shell, or \-1 if the | |
37 | .IR wait (3) | |
38 | for the shell failed. | |
39 | A return status of 127 indicates that the execution of the shell | |
40 | failed. | |
6363d9ff | 41 | .SH "SEE ALSO" |
a83c1154 KB |
42 | sh(1), execve(2), wait(2), popen(3) |
43 | .SH STANDARDS | |
44 | .B System | |
45 | conforms to ANSI X3.159-1989 (``ANSI C''). |