seatd-launch: don't use gotos in child processes
While forked (child pid is zero), don't use gotos. These will execute atexit functions and potentially mess up the stdlib. Instead, use _exit.
This commit is contained in:
parent
f2a614dcd3
commit
3a843745c2
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ int main(int argc, char *argv[]) {
|
|||
// TODO: Make seatd accept the numeric UID
|
||||
execlp("seatd", "seatd", "-n", pipebuf, "-u", user->pw_name, "-s", sockbuf, NULL);
|
||||
perror("Could not start seatd");
|
||||
goto error;
|
||||
_exit(1);
|
||||
}
|
||||
close(fds[1]);
|
||||
|
||||
|
@ -98,7 +98,7 @@ int main(int argc, char *argv[]) {
|
|||
setenv("SEATD_SOCK", sockbuf, 1);
|
||||
execv(argv[1], &argv[1]);
|
||||
perror("Could not start target");
|
||||
goto error_seatd;
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
int status = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue