Re: [PATCH v9 00/19] index-helper/watchman
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 10, 2016, 12:45 UTC
- Message-ID
- <CACsJy8CN_KzoFaROAksSuT1-sJgxP6zd2iJbqq-Dqq6EQyD_Vg@mail.gmail.com>
- In-Reply-To
- <1462835573.24478.53.camel@twopensource.com>
On Tue, May 10, 2016 at 6:12 AM, David Turner <dturner@twopensource.com> wrote:
> I think that's a SIGPIPE on the first git status. Weird, since I just > added sigpipe-avoidance code (in v8). Does anyone have any idea why > the sigchain stuff isn't doing what I think it is?
SIGPIPE code works. I tested with and without --detach (suspecting fork causing problems). I even logged all sigchain_push() calls to see if anybody else is interfering (none did, at least without watchman). Problem is elsewhere.
There are two problems with logging code in index-helper though. The redirecting std{out,err} to /dev/null should only be done when --detach is given (and I' m quite sure daemonize() already takes care of that). If --detach is used, log_warning() can't cover die(), warning() or error(), most importantly die() for example because of bugs. I think you can call set_die_routine() and similar, just be careful not lead to recursive calls (die() is protected, but I dont think error and warning are).
-- Duy