Re: [PATCH] daemon: send stderr of service programs to the syslog
From: Johannes Sixt <hidden>
Date: 2016-06-15 22:46:57
On Sonntag, 14. Juni 2009, Johannes Sixt wrote:
I don't know whether service programs like upload-archive or upload-pack write progress report to stderr or not, for example, if a client does not support side-bands. In this case this patch is probably not enough since this would fill the log with unneeded progress information. Any hints are appreciated.
The progress indicator can be helped . But there is now another anoyance: If the client terminates the connection early, this is now logged as: fatal: unable to run 'git-upload-pack' The reason for this is that upload-pack is run as 'git upload-pack', which itself spawns the external 'git-upload-pack'. The latter dies from a SIGPIPE, and the former, in execv_dashed_external(), dutyfully writes this down. The easiest solution is perhaps to make upload-pack a builtin. BUT... The motivation, of which this patch is actually a fall-out, is to clean up the messy error behavor of the start,finish,run_command family. To take care of this error message is just one more (hopefully small) point on my agenda.
I intend to follow-up this patch with another one that integrates run_service_command() in execute() in order to streamline how the 'incoming' fd is inherited to the service programs.
I'm not sure anymore whether the change I planned here is worth it. When I wrote this announcement, I had mis-remembered how daemon.c's handle() and execute() functions and --inetd mode interact. -- Hannes