aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fork.c')
-rw-r--r--tests/fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fork.c b/tests/fork.c
index 7bbc4c2..993e0d4 100644
--- a/tests/fork.c
+++ b/tests/fork.c
@@ -1,15 +1,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:
- usleep(100000U);
+ nanosleep(&ts, NULL);
return 1;
}
}