Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fork will return negative numbers, including -1, on success #303

Open
timnewsham opened this issue Jan 4, 2025 · 0 comments
Open

fork will return negative numbers, including -1, on success #303

timnewsham opened this issue Jan 4, 2025 · 0 comments

Comments

@timnewsham
Copy link

nextpid is a signed integer, and allocpid() will return negative values after 2^31 calls. It will return -1 after 2^32 calls. These pids are returned by fork(), where the distinguished value of -1 indicates a failure. At full bore on my machine it takes on the order of 5 years of continuous forks to do 2^31 forks. So after 10 years of running, rxv6 can erroneously indicate that fork has failed when it has not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant