Re: [PATCH 01/14] Change git_connect() to return a struct child_process instead of a pid_t.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 14, 2007, 17:10 UTC
- Message-ID
- <Pine.LNX.4.64.0710141810020.25221@racer.site>
- In-Reply-To
- <200710141140.10597.johannes.sixt@telecom.at>
Hi,
On Sun, 14 Oct 2007, Johannes Sixt wrote:
Show 20 quoted lines
> On Sunday 14 October 2007 02:57, Johannes Schindelin wrote:
> >
> > On Sat, 13 Oct 2007, Johannes Sixt wrote:
> > > -int finish_connect(pid_t pid)
> > > +int finish_connect(struct child_process *conn)
> > > {
> > > - if (pid == 0)
> > > + if (conn == NULL)
> > > return 0;
> > >
> > > - while (waitpid(pid, NULL, 0) < 0) {
> > > + while (waitpid(conn->pid, NULL, 0) < 0) {
> > > if (errno != EINTR)
> > > return -1;
> >
> > Just for completeness' sake: could you do a free(conn); before return
> > -1;?
>
> I know. But the loop is going away with the next patch, so I didn't
> bother. Can you live with that?It'll be hard, but I'll try ;-)
Ciao, Dscho