xref: /original-bsd/lib/libc/stdlib/system.3 (revision 3415274a)
Copyright (c) 1990 The Regents of the University of California.
All rights reserved.

%sccs.include.redist.man%

@(#)system.3 6.3 (Berkeley) 05/17/90

SYSTEM 3 ""
.AT 3
NAME
system - issue a shell command
SYNOPSIS
#include <stdlib.h>

system(const char *string);
DESCRIPTION
System hands string to the command interpreter sh (1). The calling process waits until the shell has completed, ignoring SIGINT and SIGQUIT, and blocking SIGCHLD.

If string is a NULL pointer, system will return non-zero if the command interpreter sh (1) is available, and zero if it is not.

System returns the exit status of the shell, or -1 if the wait (3) for the shell failed. A return status of 127 indicates that the execution of the shell failed.

"SEE ALSO"
sh(1), execve(2), wait(2), popen(3)
STANDARDS
System conforms to ANSI X3.159-1989 (``ANSI C'').