Re: [PATCH 1/2] credential-cache--daemon.c: Don't leave stale socket on --exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:
> On Sat, Oct 22, 2011 at 06:24:51PM +0100, Ramsay Jones wrote:
> 
>> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
>> ---
>>  credential-cache--daemon.c |   23 ++++++++++++-----------
>>  1 files changed, 12 insertions(+), 11 deletions(-)
> 
> Looks sane, and I'll probably squash it in. Alternatively, we could also
> set a signal/exit handler to clean up our socket when we die. That would
> also cover the error exit cases.

I considered this, *very* briefly, but decided it wasn't worth the effort
or complexity.

> In either case, I think we need to handle stale sockets better. They
> will happen eventually due to power loss or kill -9, anyway.

Indeed, hence patch #2. ;-)

I suspect that, given the current code, the *vast* majority of stale sockets
would be (somewhat gratuitously) created by the --exit action - hence this
patch. :-P

ATB,
Ramsay Jones


--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]