Advanced Programming in the UNIX® Environment
ptg10805159 Section 6.9 System Identification 187 struct utmp { char ut_line[8]; /* tty line: "ttyh0", "ttyd0", "ttyp0", ... */ ...
ptg10805159 188 System Data Files and Information Chapter 6 struct utsname { char sysname[]; /* name of the operating system */ ...
ptg10805159 Section 6.10 Time and Date Routines 189 There is also ahostname( 1 )command that can fetch or set the host name. (Th ...
ptg10805159 190 System Data Files and Information Chapter 6 When the clock ID is set toCLOCK_REALTIME,theclock_gettime function ...
ptg10805159 Section 6.10 Time and Date Routines 191 kernel time_t (calendar time) timespec struct tm (broken-down time) string f ...
ptg10805159 192 System Data Files and Information Chapter 6 #include <time.h> struct tm *gmtime(const time_t *calptr); str ...
ptg10805159 Section 6.10 Time and Date Routines 193 functions, each conversion specified generates a different fixed-size output ...
ptg10805159 194 System Data Files and Information Chapter 6 containing the first day in January has four or moredays in the new ...
ptg10805159 Section 6.10 Time and Date Routines 195 Thestrptimefunction is the inverse ofstrftime.Ittakes a string and converts ...
ptg10805159 196 System Data Files and Information Chapter 6 zone. If the variable is defined to be a null string, such asTZ=,the ...
ptg10805159 7 Process Environment 7.1 Introduction Beforelooking at the process control primitives in the next chapter, we need ...
ptg10805159 198 Process Environment Chapter 7 7.3 ProcessTe rmination Thereare eight ways for a process to terminate. Normal ter ...
ptg10805159 Section 7.3 Process Termination 199 Historically,theexitfunction has always performed a clean shutdown of the standa ...
ptg10805159 200 Process Environment Chapter 7 Now if we enable the 1999 ISO C compiler extensions, we see that the exit code cha ...
ptg10805159 Section 7.3 Process Termination 201 These exit handlers first appeared in the ANSI C Standard in 1989. Systems that ...
ptg10805159 202 Process Environment Chapter 7 Example The program in Figure7.3 demonstrates the use of theatexitfunction. #inclu ...
ptg10805159 Section 7.5 Environment List 203 7.4 Command-Line Arguments When a program is executed, the process that does theexe ...
ptg10805159 204 Process Environment Chapter 7 NULL environ: HOME=/home/sar\0 PATH=:/bin:/usr/bin\0 SHELL=/bin/bash\0 USER=sar\0 ...
ptg10805159 Section 7.6 Memory Layout of a C Program 205 •Initialized data segment, usually called simply the data segment, cont ...
ptg10805159 206 Process Environment Chapter 7 stack heap uninitialized data (bss) initialized data text command-line arguments a ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf