Skip to content

Commit

Permalink
fix max pid
Browse files Browse the repository at this point in the history
  • Loading branch information
halfer53 committed Apr 26, 2024
1 parent b8aa650 commit 7b8fe22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ void kreport_proc(struct proc* curr, struct filp* file) {
**/
pid_t get_next_pid(){
static pid_t pid = 2;
if (pid == INT_MAX)
pid = 2;
return pid++;
}

Expand Down

0 comments on commit 7b8fe22

Please sign in to comment.