10195501441 3 anni fa
parent
commit
bf8b8a79ec
1 ha cambiato i file con 8 aggiunte e 13 eliminazioni
  1. +8
    -13
      yeeshell.c

+ 8
- 13
yeeshell.c Vedi File

@ -400,22 +400,17 @@ int builtin_history(char **args)
int builtin_mytop()
{
pid_t pid;
int cputimemode = 1;
if ((pid = fork()) < 0)
{
printf("fork error\n");
return -1;
}
getkinfo();
mytop_memory();
get_procs();
if (prev_proc == NULL)
if (pid == 0)
{
int cputimemode = 1;
getkinfo();
mytop_memory();
get_procs();
if (prev_proc == NULL)
get_procs();
print_procs(prev_proc, proc, cputimemode);
exit(1);
}
print_procs(prev_proc, proc, cputimemode);
exit(0);
}
void mytop_memory()

Caricamento…
Annulla
Salva