|
@ -399,18 +399,15 @@ int builtin_history(char **args) |
|
|
|
|
|
|
|
|
int builtin_mytop() |
|
|
int builtin_mytop() |
|
|
{ |
|
|
{ |
|
|
pid_t pid; |
|
|
|
|
|
if (pid == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
int cputimemode = 1; |
|
|
|
|
|
getkinfo(); |
|
|
|
|
|
mytop_memory(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int cputimemode = 1; |
|
|
|
|
|
mytop_memory(); |
|
|
|
|
|
getkinfo(); |
|
|
|
|
|
get_procs(); |
|
|
|
|
|
if (prev_proc == NULL) |
|
|
get_procs(); |
|
|
get_procs(); |
|
|
if (prev_proc == NULL) |
|
|
|
|
|
get_procs(); |
|
|
|
|
|
print_procs(prev_proc, proc, cputimemode); |
|
|
|
|
|
exit(0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
print_procs(prev_proc, proc, cputimemode); |
|
|
|
|
|
|
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|