diff options
author | наб <[email protected]> | 2021-05-08 13:17:04 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-05-21 10:16:06 -0700 |
commit | 93ef500388db2bf8e85446a3df0b013609cdbd73 (patch) | |
tree | d752ff227fcbe6228665ac1296e92a9299bc5261 /man/man8 | |
parent | 5da6353987ccf73c67e9e1c68faa66989b76a583 (diff) |
Don't abuse vfork()
According to POSIX.1, "vfork() has the same effect as fork(2),
except that the behavior is undefined if the process created by vfork()
either modifies any data other than a variable of type pid_t
used to store the return value from vfork(), [...],
or calls any other function before successfully calling _exit(2)
or one of the exec(3) family of functions."
These do all three, and work by pure chance
(or maybe they don't, but we blisfully don't know).
Either way: bad idea to call vfork() from C,
unless you're the standard library, and POSIX.1-2008 removes it entirely
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12015
Diffstat (limited to 'man/man8')
0 files changed, 0 insertions, 0 deletions