1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-26 01:44:29 +03:00

temporary

This commit is contained in:
Rui Ueyama 2021-01-09 21:33:46 +09:00
parent ba1c986399
commit 3c47544bb4
2 changed files with 4 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ int main(int argc, char **argv) {
if (!config.preload)
if (int code; resume_daemon(argv, &code))
_exit(code);
exit(code);
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);

View File

@ -188,6 +188,9 @@ void daemonize(char **argv, std::function<void()> *wait_for_client,
if (conn == -1)
Error() << "accept failed: " << strerror(errno);
unlink(socket_tmpfile);
dup2(recv_fd(conn), STDOUT_FILENO);
dup2(recv_fd(conn), STDERR_FILENO);
};
*on_complete = [=]() { write(conn, (char []){1}, 1); };