News for hackers. Stuff that matters.
Re:Fork() without exec() is dangerous in large programs (2016) by ttoinou on Tuesday June 14, 2022 @12:33PM (#31741896)
> Only use fork in toy programs. The challenge is that successful toy programs grow into large ones, and large programs eventually use threads. It might be best just to not bother.

How do you create a new process and pipe it data in a fast fashion without using fork, exec or posix_spawn ?

Re:Fork() without exec() is dangerous in large programs (2016) by masklinn on Tuesday June 14, 2022 @01:07PM (#31742515)
> without using fork, exec or posix_spawn ?

Did you manage to forget what you'd read two paragraphs earlier when you reached this bit? Because the essay's first recommendation is literally:

> Only use fork to immediately call exec (or just use posix_spawn).

It seems difficult to infer "don't use exec or posix_spawn" from this.

Re:Fork() without exec() is dangerous in large programs (2016) by ttoinou on Wednesday June 15, 2022 @10:44PM (#31762001)
Ofc I read that. I think a "only" was missing in the sentence, hence the confusion
Re:Fork() without exec() is dangerous in large programs (2016) by ehvatum on Tuesday June 14, 2022 @12:48PM (#31742149)
Re:Fork() without exec() is dangerous in large programs (2016) by cryptonector on Tuesday June 14, 2022 @02:25PM (#31743744)
posix_spawn or vfork+exec