focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / system
1 NAME
2     system - issue a shell command
3
4 SYNOPSIS
5     system(cmd)
6
7 TYPES
8     cmd         str
9
10     return      int
11
12 DESCRIPTION
13     This function excutes the shell command found in the srtring, cmd.
14     The return value is system dependent.  On POSIX P1003.1 compliant
15     systems the return value is defined by the waitpid system call.
16     Typically a shell command that returns with a 0 exit status will
17     cause this function to return a 0 value.  On some systems, a shell
18     command that returns with an exit status of e will cause this
19     function to return e*256.  Core dumps, termination due to signals
20     and other waitpid values will change the return value.
21
22     On POSIX P1003.1 compliant systems, if cmd is empty then this function
23     will determine if the shell is executable.  If the shell is executable,
24     0 is returned otherwise non-zero is returned.
25
26
27 EXAMPLE
28     > system("")
29             0
30     > system("true")
31             0
32     > system("exit 2")
33             512
34     > system("date")
35     Sun Jul  9 03:21:48 PDT 1995
36             0
37
38 LIMITS
39     none
40
41 LINK LIBRARY
42     none
43
44 SEE ALSO
45     XXX - fill in
46