Skip to content

Commit 3ed9b29

Browse files
committed
Rework miral::launch_app_env() even more to avoid calling functions that are not async-signal-safe after fork() (#3594)
1 parent 35785da commit 3ed9b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/miral/launch_app.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ auto miral::launch_app_env(
151151

152152
if (pid == 0)
153153
{
154-
mir::log_debug("Restoring sigmask");
155154
sigset_t all_signals;
156155
sigfillset(&all_signals);
157156
pthread_sigmask(SIG_UNBLOCK, &all_signals, nullptr);
158157

158+
// execvpe() isn't listed as being async-signal-safe, but the implementation looks fine and rewriting seems unnecessary
159159
execvpe(exec_args[0], const_cast<char*const*>(exec_args.data()), const_cast<char*const*>(exec_env.data()));
160160

161161
mir::log_warning("Failed to execute client (\"%s\") error: %s", exec_args[0], strerror(errno));

0 commit comments

Comments
 (0)