Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

execve(2)

wait(2)

system(3)

SYSTEM(3F)  —  FORTRAN LIBRARY ROUTINES

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 will be used as the command interpreter (shell); otherwise sh(1) is used.

The current process waits until the command terminates.  The returned value will be 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 gets called depends on 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.

FILES

libF77.a

SEE ALSO

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

BUGS

string can not be longer than 1024 characters. 

SEE ALSO

sh (3F)

Sun Release 4.1  —  Last change: 28 October 1990

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