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