Advanced Programming in the UNIX® Environment
ptg10805159 Section 8.13 systemFunction 267 #include "apue.h" #include <sys/wait.h> int main(void) { int status; if ((stat ...
ptg10805159 268 Process Control Chapter 8 #include "apue.h" int main(int argc, char *argv[]) { int status; if (argc < 2) err_ ...
ptg10805159 Section 8.14 Process Accounting 269 The superuser permissions that we gave thetsysprogram areretained across thefork ...
ptg10805159 270 Process Control Chapter 8 typedef u_short comp_t; /* 3-bit base 8 exponent; 13-bit fraction */ struct acct { cha ...
ptg10805159 Section 8.14 Process Accounting 271 FreeBSD Linux Mac OS X Solaris ac_flag Description 8.0 3.2.0 10.6.8 10 AFORK pro ...
ptg10805159 272 Process Control Chapter 8 else if (pid != 0) { /* parent */ sleep(2); exit(2); /* terminate with exit status 2 * ...
ptg10805159 Section 8.14 Process Accounting 273 #endif #if !defined(HAS_AXSIG) #define AXSIG 0 #endif #if !defined(BSD) static u ...
ptg10805159 274 Process Control Chapter 8 BSD-derived platforms don’t support theac_stat member, so we define the HAS_AC_STATcon ...
ptg10805159 Section 8.15 User Identification 275 Section 8.6. The only information in this byte is a core-flag bit (usually the ...
ptg10805159 276 Process Control Chapter 8 Given the login name, we can then use it to look up the user in the password file — to ...
ptg10805159 Section 8.16 Process Scheduling 277 Theincrargument is added to the nice value of the calling process. Ifincris too ...
ptg10805159 278 Process Control Chapter 8 optional command argument. Afterrunning for 10 seconds, both processes print the value ...
ptg10805159 Section 8.16 Process Scheduling 279 err_sys("fork failed"); }else if (pid == 0) { /* child */ s="child"; printf("cur ...
ptg10805159 280 Process Control Chapter 8 In contrast, when the child has the highest possible nice value (the lowest priority), ...
ptg10805159 Section 8.17 Process Times 281 #include "apue.h" #include <sys/times.h> static void pr_times(clock_t, struct t ...
ptg10805159 282 Process Control Chapter 8 (tmsend->tms_cutime - tmsstart->tms_cutime) / (double) clktck); printf(" child s ...
ptg10805159 Chapter 8 Exercises 283 execfunctions: interpreter files and how they operate. An understanding of the various user ...
ptg10805159 This page intentionally left blank ...
ptg10805159 9 Process Relationships 9.1 Introduction We learned in the previous chapter that thereare relationships between proc ...
ptg10805159 286 Process Relationships Chapter 9 common devices on PDP-11swereDH-11sand DZ-11s. A host had a fixed number of thes ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf