|
|
刚刚开始看Advanced Programming in UNIX Environment, 里面Chapter 1练习题的1.2题:
In the output from the program in Figure 1.6, what happened to the processes with process IDs 852 and 853?
是这样的,它是一个这样的程序:
- #include "apue.h"
- int
- main(void)
- {
- printf("hello world from process ID %d\n", getpid());
- exit(0);
- }
复制代码
调用如下:
- $ ./a.out
- hello world from process ID 851
- $ ./a.out
- hello world from process ID 854
复制代码
请问是怎么回事呢?
我的Debian Linux,我试调用了一下程序,我的两个pid输出是连续的呀。 |
|