Re: [msysGit] [PATCH/RFC 08/11] daemon: use explicit file descriptor

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

 



On Freitag, 27. November 2009, Erik Faye-Lund wrote:
> On Fri, Nov 27, 2009 at 3:23 PM, Erik Faye-Lund
> <kusmabite@xxxxxxxxxxxxxx> wrote:
> > At the very least, I should remove the
> > "dup2(incoming, 1)"-call, but I'm open to other suggestions. Perhaps I
> > can change this patch to do the entire socket-passing (which is
> > currently in the next patch)?

No, an infrastructure change in a separate patch is good.

> Something along these lines?
>
> ---8<---
> -	cld.in = cld.out = fd;
> +	cld.in = dup(fd);
> +	cld.out = fd;
>...
> -	dup2(incoming, 0);
> -	dup2(incoming, 1);
> -	close(incoming);
> -
> -	exit(execute(0, addr));
> +	exit(execute(incoming, addr));
> ---8<---

Yes, this looks very good.

> When I think more about it, I might've broken the inetd-mode as it
> should communicate over stdin and stdout (not just stdin as it would
> try to do now)... I don't know the inetd internals, but this frightens
> me a bit.

Do we need inetd mode on Windows? At one time a looked for a inetd-like 
service, but couldn't find one.

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