Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.6.0 FF
-
None
-
-
e71c226d6 (dev), 0dc6ccbc5 (6.6), bd32c7d70 (dev)
Description
Following commit c5c7712910f5de454ee0d9a30b9a848d023bb543, CodeChecker complains (report-ID: 1330341), about the code run in the child process immediately after the doFork() call, including a signal() call, that
Indeed, we're in the child process here and the vfork man-page says, explicitly:This function call is prohibited after a successful vfork
It is possible this UB is more nominal than actual, but the code should at least contain a justification for ignoring the fact that it's UB.(From POSIX.1) The vfork() function 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
returns from the function in which vfork() was called, or calls
any other function before successfully calling _exit(2) or one of
the exec(3) family of functions.