Browse Source

test mytop

master
10195501441 3 years ago
parent
commit
b0ed4d16f7
1 changed files with 8 additions and 10 deletions
  1. +8
    -10
      yeeshell.c

+ 8
- 10
yeeshell.c View File

@ -404,20 +404,18 @@ int builtin_mytop()
if ((pid = fork()) < 0) if ((pid = fork()) < 0)
{ {
printf("fork error\n"); printf("fork error\n");
return;
return -1;
} }
if (pid == 0)
getkinfo();
mytop_memory();
get_procs();
if (prev_proc == NULL)
{ {
getkinfo();
mytop_memory();
get_procs(); get_procs();
if (prev_proc == NULL)
{
get_procs();
}
print_procs(prev_proc, proc, cputimemode);
exit(0);
} }
print_procs(prev_proc, proc, cputimemode);
exit(0);
} }
void mytop_memory() void mytop_memory()

Loading…
Cancel
Save