4 ms·
I cannot get the first simple example working. int main() { while (1) { if (fork()) _exit(0); } return 0; }
by johannkokos 8y ago
I cannot get the first simple example working.
int main()
{
while (1) {
if (fork())
_exit(0);
}
return 0;
}
If I run `htop` immediately after typing `./a.out`, it shows a error,
Could not create child process - exiting
fork: Resource temporarily unavailable
However, if I wait a second or more, I cannot find `a.out` in the process list.
- nytopop 8y agoYou can apply a filter in htop before running your binary, it'll only show matching processes. I think the hotkey is F4.