Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ system(3) — SunOS 4.1.3B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

execve(2V)

wait(2V)

popen(3S)

SYSTEM(3)  —  C LIBRARY FUNCTIONS

NAME

system − issue a shell command

SYNOPSIS

system(string)
char ∗string;

DESCRIPTION

system() gives the string to sh(1) as input, just as if the string had been typed as a command from a terminal.  The current process performs a wait(2V) system call, and waits until the shell terminates.  system() then returns the exit status returned by wait(2V).  Unless the shell was interrupted by a signal, its termination status is contained in the 8 bits higher up from the low-order 8 bits of the value returned by wait(). 

SEE ALSO

sh(1), execve(2V), wait(2V), popen(3S)

DIAGNOSTICS

Exit status 127 (may be displayed as "32512") indicates the shell could not be executed. 

Sun Release 4.1  —  Last change: 22 January 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026