blob: 993e0d4c7c7ab26478f70b0e0b28a146c113f2bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <time.h>
#include <unistd.h>
int
main(void)
{
struct timespec ts = {0, 100000000L};
switch (fork()) {
case -1:
return -1;
case 0:
return 2;
default:
nanosleep(&ts, NULL);
return 1;
}
}
|