Re: [PATCH] git daemon: avoid calling syslog() from a signal handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

>> So you will check every 1ms to see if there are new dead children, but why
>> is this necessary?
>
> This comes from me not reading the man page for poll() properly.  Of 
> course, I want to check every second: syslog timestamps the messages with 
> a resolution of 1 second, AFAIR, or at least some of them do.

Hmm.

The question was not about the millisecond typo, but about why time-out at
all.

We would need to somehow break out of poll() after handling the SIGCHLD
signal and I guess timing the syscall out would be the most obvious way,
but somehow it felt awkward.

Another way would be to set up a pipe to ourself that is included in the
poll() and write a byte to the pipe from the signal handler.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux