Re: [PATCH 2/3] git-daemon: make the signal handler almost a no-op

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stephen R. van den Berg <srb@...>
Cc: <git@...>, Johannes Schindelin <Johannes.Schindelin@...>
Date: Wednesday, August 13, 2008 - 8:09 pm

"Stephen R. van den Berg" <srb@cuci.nl> writes:


Dscho may want to say something about "even they aren't..." part, after he
comes back to the keyboard.


which should have been in 1/3, I suppose.


Why?

child_handler() logically is a two step process:

 * We are just informed that somebody died; let's do something about the
   corpse;

 * On some systems we need to rearm signals once they fired, so let's do
   that if necessary.

With your change, the first part happens to be almost no-op, but I do not
think it justifies this hunk.

After all, we might even want to do something like:

	static void child_handler(int signo)
        {
        	if (USE_SYSV_SIGNAL_SEMANTICS)
                	signal(SIGCHLD, child_handler);
	}

and have the compiler optimize out the signal rearming with

	cc CFLAGS=-DUSE_SYSV_SIGNAL_SEMANTICS=0

on suitable platforms in the future.  But you still want the initial
signal set-up to happen unconditionally.

At this point, we aren't informed by the system that somebody died, and we
would want to arm the signal regardless of the platform's signal semantics.

The rest of the patch looked sane, although I did not read it very
carefully.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] git-daemon: logging done right, Stephen R. van den Berg, (Wed Aug 13, 4:43 am)
Re: [PATCH 1/3] git-daemon: logging done right, Junio C Hamano, (Wed Aug 13, 7:13 pm)
[PATCH 3/3] git-daemon: rewrite kindergarden, Stephen R. van den Berg, (Wed Aug 13, 4:43 am)
Re: [PATCH 3/3] git-daemon: rewrite kindergarden, Petr Baudis, (Wed Aug 13, 5:05 am)
Re: [PATCH 3/3] git-daemon: rewrite kindergarden, Stephen R. van den Berg, (Wed Aug 13, 6:37 am)
[PATCH] git-daemon: rewrite kindergarden, Stephen R. van den Berg, (Wed Aug 13, 5:00 am)
[PATCH] git-daemon: rewrite kindergarden, new option --max-c..., Stephen R. van den Berg, (Wed Aug 13, 6:40 am)
Re: [PATCH 3/3] git-daemon: rewrite kindergarden, Stephen R. van den Berg, (Wed Aug 13, 4:58 am)
[PATCH 2/3] git-daemon: make the signal handler almost a no-op, Stephen R. van den Berg, (Wed Aug 13, 4:43 am)
Re: [PATCH 2/3] git-daemon: make the signal handler almost a..., Johannes Schindelin, (Thu Aug 14, 9:41 am)
Re: [PATCH 2/3] git-daemon: make the signal handler almost a..., Junio C Hamano, (Wed Aug 13, 8:09 pm)
Re: [PATCH 2/3] git-daemon: make the signal handler almost a..., Stephen R. van den Berg, (Wed Aug 13, 8:18 pm)
Re: [PATCH 2/3] git-daemon: make the signal handler almost a..., Stephen R. van den Berg, (Thu Aug 14, 3:47 am)
Re: [PATCH 2/3] git-daemon: make the signal handler almost a..., Stephen R. van den Berg, (Thu Aug 14, 6:13 am)