News for hackers. Stuff that matters.
Re:Fork() without exec() is dangerous in large programs (2016) by spc476 on Tuesday June 14, 2022 @03:04PM (#31744398)
Hmmm, from <https://www.man7.org/linux/man-pages/man3/posix_spawn.3.html>:

    The posix_spawn() and posix_spawnp() functions provide the
    functionality of a combined fork(2) and exec(3), with some
    optional housekeeping steps in the child process before the
    exec(3).  These functions are not meant to replace the fork(2)
    and execve(2) system calls.  In fact, they provide only a subset
    of the functionality that can be achieved by using the system
    calls.
Also, there's no way to set resource limits in the child process, nor switch user or group ID, using posix_spawn().
Re:Fork() without exec() is dangerous in large programs (2016) by GoblinSlayer on Wednesday June 15, 2022 @07:09AM (#31751344)
For that you may need posix_spawn and exec, but still can evade fork completely.