Re: [PATCH v2 1/2] daemon: move daemonize() to libgit.a

2014-02-11 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Feb 11, 2014 at 1:46 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> diff --git a/setup.c b/setup.c >>> index 6c3f85f..b09a412 100644 >>> --- a/setup.c >>> +++ b/setup.c >>> @@ -787,3 +787,27 @@ void sanitize_stdfds(void) >>> if (fd > 2) >>>

Re: [PATCH v2 1/2] daemon: move daemonize() to libgit.a

2014-02-10 Thread Duy Nguyen
On Tue, Feb 11, 2014 at 1:46 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/setup.c b/setup.c >> index 6c3f85f..b09a412 100644 >> --- a/setup.c >> +++ b/setup.c >> @@ -787,3 +787,27 @@ void sanitize_stdfds(void) >> if (fd > 2) >> close(fd); >> } >

Re: [PATCH v2 1/2] daemon: move daemonize() to libgit.a

2014-02-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/setup.c b/setup.c > index 6c3f85f..b09a412 100644 > --- a/setup.c > +++ b/setup.c > @@ -787,3 +787,27 @@ void sanitize_stdfds(void) > if (fd > 2) > close(fd); > } > + > +int daemonize(void) > +{ > +#ifdef NO_POSIX_GOODIES > + e

Re: [PATCH v2 1/2] daemon: move daemonize() to libgit.a

2014-02-10 Thread Erik Faye-Lund
On Sat, Feb 8, 2014 at 8:08 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > diff --git a/setup.c b/setup.c > index 6c3f85f..b09a412 100644 > --- a/setup.c > +++ b/setup.c > @@ -787,3 +787,27 @@ void sanitize_stdfds(void) > if (fd > 2) > close(fd); >

[PATCH v2 1/2] daemon: move daemonize() to libgit.a

2014-02-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 1 + daemon.c | 30 -- setup.c | 24 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/cache.h b/cache.h index dc040fb..264b6f1 100644 --- a/cache.h +++ b/cache.h @@ -434,6 +43