diff --git a/yeeshell.c b/yeeshell.c index 05a4b40..6778ec1 100644 --- a/yeeshell.c +++ b/yeeshell.c @@ -399,18 +399,15 @@ int builtin_history(char **args) 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(); - if (prev_proc == NULL) - get_procs(); - print_procs(prev_proc, proc, cputimemode); - exit(0); - } + print_procs(prev_proc, proc, cputimemode); + return 1; }