Re: configure.in help

From: Robert Collins <robert.collins@dont-contact.us>
Date: Sun, 16 Jul 2000 09:31:32 +1000

Well the error status isn't set properly when the stackdump occurs.. thanks
I'll pass that back to the cygwin group.

Uhmmm re starting programs with fd 0, 1 & 2 closed - that's the behaviour
of squid right before the active child is execvp'd. I'm trying to minimise
the platform specific changes in the main code. Should I modify squid to
link those fd's to /dev/null ?

Rob

----- Original Message -----
From: "Henrik Nordstrom" <hno@hem.passagen.se>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Sunday, July 16, 2000 7:48 AM
Subject: Re: configure.in help

> Is error status properly set in cygwin?
>
> Try compiling theprogram, and then run
>
> ./test_program ; echo "Status: $?"
>
> If you get "Status: 0", then no error is indicated by running the
> program..
>
> Also, the return statement should return 1 to indicate an error in case
> exec fails..
>
> Hmm.. also it is not very nice to start programs having
> stdin/stdout/stderr closed. You SHOULD link these filedescriptors to
> something, for example /dev/null.
>
> /Henrik
>
> Robert Collins wrote:
> >
> > Hi,
> > Under early (until tonights/tomorrow nights snapshot :=) ) versions
of
> > Cygwin, execvp() dies when fd's 0,1 and 2 are closed before it's called.
(I
> > emailed about about that a short while ago). I've provided a patch to
the
> > cygwin maintainers and it will be in the next release (due soon) so it's
one
> > less cygwin-specific line in the code...
> > However I think we should check for old installations and prevent
compiling
> > with a warning...
> >
> > The following code will stackdump on broken installs
> > int main (int argc, char **argv)
> > {
> > int i;
> >
> > for(i=0;i<10;i++)
> > close(i);
> > execvp("ls","");
> >
> > return 0;
> > }
> >
> > However I have never written m4 scripts before, and I'm having some
trouble
> > getting it to test. The AC_TRY_RUN is returning to the ok branch, not
the
> > failed branch...
> >
> > Any suggestions, or should I just make it a README item?
> >
> > Rob
>
Received on Sat Jul 15 2000 - 17:26:30 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:32 MST