News for hackers. Stuff that matters.
Re:Fork() without exec() is dangerous in large programs (2016) by krylon on Tuesday June 14, 2022 @01:19PM (#31742722)
The devil, as they say, is in the details.

But to be fair, the only times I can recall using fork() without exec() were forking network servers, and that was mostly me learning about doing network stuff, and a forking server was the easiest to implement manually.

Oh yeah, and that one time I accidentally wrote a fork bomb trying to stress test a DNS server. At least I learned something from my mistake. ;-)

EDIT: To me, using fork() without exec() is kind of like operator overloading - there are cases where it absolutely is the right tool, but these aren't very numerous, so one should exercise caution. A lot.

There are no comments on this comment yet.