nghttpx: Call setsid after executing new binary

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-25 00:55:08 +09:00
parent 0b32df94a5
commit 6680d8b792
1 changed files with 6 additions and 0 deletions

View File

@ -249,6 +249,12 @@ void exec_binary(SignalServer *ssv) {
shrpx_signal_unset_master_proc_ign_handler();
rv = shrpx_signal_unblock_all();
if (setsid() == -1) {
auto error = errno;
LOG(ERROR) << "setsid() failed: " << strerror(error);
}
if (rv != 0) {
auto error = errno;
LOG(ERROR) << "Unblocking all signals failed: " << strerror(error);