Re: [PATCH] git daemon: avoid calling syslog() from a signal handler | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi, On Sat, 5 Jul 2008, Junio C Hamano wrote: > 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. Because I do not want to change the semantics! ATM, in those cases where it works (as opposed to hanging!), git-daemon --verbose reports in the syslog when a client disconnected, possibly with an error. It does so with a timestamp so that you can see how long the connection lasted. That is what logs are useful for. Now, syslog has timestamps at second-resolution (at least here it does), and I wanted to imitate that. The alternative would be to deprive all users of an (mostly) accurate timestamp of the disconnect time. > 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. It still would need to break out of the poll(), in which case the effect would be _exactly_ the same, but with a lot of more trouble, and opportunities for me to bring in new bugs, right? Ciao, Dscho -- 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
[Newbies FAQ] [Kernel List] [Site Home] [Free Online Dating] [Gcc Help] [IETF Annouce] [DCCP] [Netdev] [Networking] [Security] [V4L] [Bugtraq] [Free Online Dating] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Linux SCSI] [DDR & Rambus] [Linux Resources]