-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
35 lines (32 loc) · 646 Bytes
/
main.c
File metadata and controls
35 lines (32 loc) · 646 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
#include <stdio.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <pwd.h>
#include <limits.h>
#include <string.h>
#include <errno.h>
char *user, *home, *t, *args[20], file[20], file2[20];
char temp[30], buff[2], cwd[1000], executable[30], buf2[1000], background[10][20], system_name[10];
int back, backpid[10], backcount;
int main()
{
char buf1[PATH_MAX+1];
home = getcwd(buf1,PATH_MAX+1);
home[strlen(home)+1]='\0';
backcount=0;
int x,y,number;
for (x=0;x<10;x++)
{
background[x][0]='\0';
backpid[x]=0;
}
while(1)
{
startPrint();
readCommand();
printBackground();
}
return 0;
}