diff --git a/fun_2.c b/fun_2.c index f8ef86e..e82f1c2 100644 --- a/fun_2.c +++ b/fun_2.c @@ -8,7 +8,7 @@ int pipe(int *fd); int fork(); int close(int arg); int dup(int fd); -int execvp(const char* command, char* argv[]); +int execvp(const char *, char * const *); int wait(int arg); static int num = 0; static char storage[MAXLINE][MAXLINE]; diff --git a/main b/main index d28b99d..beb8b4f 100755 Binary files a/main and b/main differ diff --git a/mytop.c b/mytop.c index 0e3bf60..b38bfae 100644 --- a/mytop.c +++ b/mytop.c @@ -1,4 +1,4 @@ - +/* #include #include #include @@ -116,7 +116,7 @@ void parse_file(pid_t pid) p->p_endpoint = endpt; p->p_pid = pid; //读入名字 状态 阻塞状态 动态优先级 进程时间 高周期 低周期 - if (fscanf(fp, " %255s %c %d %d %lu %*u %lu %lu", + if (fscanf(fp, " %255s %c %d %d %ld %*u %lu %lu", name, &state, &p->p_blocked, &p->p_priority, &p->p_user_time, &cycles_hi, &cycles_lo) != 7) { @@ -335,3 +335,6 @@ void mytop() print_procs(prev_proc,proc,1); return; } +*/ +void mytop() +{} \ No newline at end of file