-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsleep.c
More file actions
37 lines (34 loc) · 721 Bytes
/
sleep.c
File metadata and controls
37 lines (34 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <string.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <assert.h>
#include <dirent.h>
#include <sys/stat.h>
#include <time.h>
#include <grp.h>
#ifdef __APPLE__
#include <sys/xattr.h>
#include <sys/acl.h>
#endif
#include <signal.h>
int main(){
// if(pid){
// // printf("stop\n");
// // kill(pid, SIGSTOP);
// // sleep(3);
// // printf("continuing\n");
// // kill(pid, SIGCONT);
// }
// else{
int i = 100000;
while(i--){
printf("child\n");
usleep(100000);
}
//execlp("/bin/sleep","sleep", "5", NULL);
}