mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-19 19:51:01 +00:00
Move logging on TCP timeout from child process to main process.
Callong my_syslog from a signal handler is not good. Thanks to Dominik Derigs for spotting this.
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -1084,6 +1084,9 @@ int cache_recv_insert(time_t now, int fd)
|
|||||||
!read_write(fd, (unsigned char *)&validatecountp, sizeof(validatecountp), RW_READ)))
|
!read_write(fd, (unsigned char *)&validatecountp, sizeof(validatecountp), RW_READ)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (op == PIPE_OP_KILLED)
|
||||||
|
my_syslog(LOG_INFO, _("TCP process for DNSSEC validation timed out"));
|
||||||
|
|
||||||
/* There's a tiny chance that the frec may have been freed
|
/* There's a tiny chance that the frec may have been freed
|
||||||
and reused before the TCP process returns. Detect that with
|
and reused before the TCP process returns. Detect that with
|
||||||
the uid field which is unique modulo 2^32 for each use. */
|
the uid field which is unique modulo 2^32 for each use. */
|
||||||
|
|||||||
@@ -1385,8 +1385,6 @@ static void sig_handler(int sig)
|
|||||||
read_write(daemon->pipe_to_parent, (unsigned char *)(&daemon->forward_to_tcp), sizeof(daemon->forward_to_tcp), RW_WRITE);
|
read_write(daemon->pipe_to_parent, (unsigned char *)(&daemon->forward_to_tcp), sizeof(daemon->forward_to_tcp), RW_WRITE);
|
||||||
read_write(daemon->pipe_to_parent, (unsigned char *)(&daemon->forward_to_tcp->uid), sizeof(daemon->forward_to_tcp->uid), RW_WRITE);
|
read_write(daemon->pipe_to_parent, (unsigned char *)(&daemon->forward_to_tcp->uid), sizeof(daemon->forward_to_tcp->uid), RW_WRITE);
|
||||||
|
|
||||||
my_syslog(LOG_INFO, _("TCP process for DNSSEC validation timed out"));
|
|
||||||
|
|
||||||
_exit(0);
|
_exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user