2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
15 waitpid() should wait only once.
22 printf("child 2 1. parent id = %ld\n", getppid());
24 printf("child 2 2. parent id = %ld\n", getppid());
29 //! exits before child 2
33 printf("child 1 process group: %ld\n", getpgrp());
47 printf("main process group: %ld\n", getpgrp());
55 pid
= waitpid(0, &childStatus
, 0);
56 printf("waitpid() returned %ld (%s), child status %d\n", pid
, strerror(errno
), childStatus
);