Code

connect: let callers know if connection is a socket
authorJeff King <peff@peff.net>
Mon, 16 May 2011 06:52:11 +0000 (02:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 May 2011 23:20:01 +0000 (16:20 -0700)
commit7ffe853b106680720ddec999e1daf5c186997a1f
treeaa8f55a2816c515f502018acbbaef30992afe8c0
parent5cbf8246d2e68470648d123e356665fca9ffca73
connect: let callers know if connection is a socket

They might care because they want to do a half-duplex close.
With pipes, that means simply closing the output descriptor;
with a socket, you must actually call shutdown.

Instead of exposing the magic no_fork child_process struct,
let's encapsulate the test in a function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
connect.c