Unix Processes (cont)
Components of process environment (C programmer's view):
-
char *argv[] - command line "words"
-
int argc - size of argv[]
-
char *env[] - name=value pairs from shell
-
FILE *stdin - buffered byte-stream, int getc(FILE *)
-
FILE *stdout - buffered byte-stream, putc(int, FILE *)
-
FILE *stderr - non-buffered byte-stream, putc
-
exit(int) - terminate program, set exit status
-
return(int) - terminate main() , set exit status
|