ps update
This commit is contained in:
parent
1bdf0defd2
commit
0e8d433065
Binary file not shown.
@ -218,13 +218,17 @@ void myps (char **argv){
|
||||
strcat(direc, "./");
|
||||
strcat(direc, name);
|
||||
strcat(direc, "/status"); /*tworzenie sciezki*/
|
||||
if (fork() == 0)
|
||||
execlp("sed", "sed", "-n", "1p", direc, NULL);
|
||||
|
||||
if (fork() == 0){
|
||||
printf("Pid: %s ", name);
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
wait(NULL);
|
||||
|
||||
if (fork() == 0)
|
||||
execlp("sed", "sed", "-n", "6p", direc, NULL);
|
||||
if (fork() == 0){
|
||||
execlp("sed", "sed", "-n", "1p", direc, NULL);
|
||||
}
|
||||
else
|
||||
wait(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user