Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ system(3F) — Sun WorkShop 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

execve(2)

wait(2)

system(3)

sh(3F)

SYSTEM(3F)

NAME

system − execute operating system command

SYNOPSIS

integer function system (string)
character∗(∗) string

DESCRIPTION

The function system gives string to your shell as input, as if the string had been typed as a command.  If the environment variable SHELL is found, its value is used as the command interpreter (shell); otherwise, sh(1) is used. 

The current process waits until the command terminates.  The returned value is the exit status of the shell.  See wait(2) for an explanation of this value. 

Historically, cc and f77 developed with different assumptions:

If cc calls system, the shell is always the Bourne shell.  If f77 calls system, which shell is called depends on the environment variable SHELL. 

The system function flushes all open files. 

For output files, the buffer is flushed to the actual file. 

For input files, the position of the pointer is unpredictable. 

The system function is not MT-safe.  Do not call it from FORTRAN MP programs. 

FILES

libF77.a

SEE ALSO

execve(2), wait(2), system(3)

BUGS

string cannot be longer than 1023 characters. 

SEE ALSO

sh(3F)

SunOS 5.0  —  Last change: 07 July 1995

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