You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::process::unix: Do not unwind past fork() in child
Unwinding past fork() in the child causes whatever traps the unwind
to return twice. This is very strange and clearly not desirable.
With the default behaviour of the thread library, this can even result
in a panic in the child being transformed into zero exit status (ie,
success) as seen in the parent!
If unwinding reaches the fork point, the child should abort.
Annotating the closure with #[unwind(aborts)] is not sufficiently
stable right now, so we use catch_unwind. This requires marking the
closure UnwindSafe - which is fine regardless of the contents of the
closure, since we abort on unwind and won't therefore touch anything
the closure might have captured.
Fixes#79740.
Signed-off-by: Ian Jackson <[email protected]>
0 commit comments