Basically, this is the same fix as commit
914ca6cf :-/. Once again, we
called exit() instead of _exit(), but this time it lead to a kill(0,
SIGTERM), effectively killing all processes in the i3 process group,
including i3 itself. The cause for the kill(0) is that nagbar_pid is set
to 0 by fork(), signaling we’re in the child process. The cleanup
handler only checks for nagbar_pid being -1 as a special value, however.
char buffer[BUFSIZ];
if (readlink("/proc/self/exe", buffer, BUFSIZ) == -1) {
warn("could not read /proc/self/exe");
- exit(1);
+ _exit(1);
}
dir = dirname(buffer);
sasprintf(&migratepath, "%s/%s", dir, name);
#endif
warn("Could not start %s", name);
- exit(2);
+ _exit(2);
}
/*