-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathctrlz.h
More file actions
42 lines (39 loc) · 910 Bytes
/
ctrlz.h
File metadata and controls
42 lines (39 loc) · 910 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
38
39
40
41
42
#include <sys/utsname.h>
#include <unistd.h>
#include <string.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<fcntl.h>
#include <dirent.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<grp.h>
#include<pwd.h>
#include <sys/stat.h>
#include <time.h>
#include <locale.h>
#include <langinfo.h>
#include <stdio.h>
#include <stdint.h>
void ctrlz(int sig_num) {
pid_t process = forsig;
if (process > 0) {
kill(process, sig_num);
bg1[count] = process;
bg2[count] = process;
for(int w = 0;w<strlen(abcd);w++)
{
if(abcd[w] == ' ')
break;
names[count][w] = abcd[w];
}
count+=1;
printf("\n");
fflush(stdout);
} else {
printf("\n");
print_dirname(size);
fflush(stdout);
}
}