From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Brian Foster <brian.foster@innova-card.com>, git@vger.kernel.org
Subject: Re: [PATCH] git daemon: avoid calling syslog() from a signal handler
Date: Sun, 6 Jul 2008 03:42:09 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.1.00.0807060337480.3557@eeepc-johanness> (raw)
In-Reply-To: <7vabgwtf6m.fsf@gitster.siamese.dyndns.org>
Hi,
On Sat, 5 Jul 2008, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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
next prev parent reply other threads:[~2008-07-06 1:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 12:00 Non-inetd git-daemon hangs in syslog(3)/fclose(3) if --syslog --verbose accessing non-repositories Brian Foster
2008-07-03 12:45 ` Johannes Schindelin
2008-07-03 13:52 ` Brian Foster
2008-07-03 14:32 ` Johannes Schindelin
2008-07-03 15:27 ` [PATCH] git daemon: avoid calling syslog() from a signal handler Johannes Schindelin
2008-07-05 7:34 ` Junio C Hamano
2008-07-05 10:05 ` Johannes Schindelin
2008-07-05 17:26 ` Junio C Hamano
2008-07-06 1:42 ` Johannes Schindelin [this message]
2008-07-06 6:08 ` Junio C Hamano
2008-07-06 12:23 ` [PATCH v2] " Johannes Schindelin
2008-07-07 1:50 ` Junio C Hamano
2008-07-07 6:54 ` Stephen R. van den Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0807060337480.3557@eeepc-johanness \
--to=johannes.schindelin@gmx.de \
--cc=brian.foster@innova-card.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox