www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Poindexter" <alan_poindex...@bmc.com>
Subject config/1159: Configure always returns exit code of 0
Date Tue, 23 Sep 1997 00:00:13 GMT

>Number:         1159
>Category:       config
>Synopsis:       Configure always returns exit code of 0
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Sep 22 17:00:02 1997
>Originator:     alan_poindexter@bmc.com
>Release:        1.2.4
SunOS xxxx 5.5.1 Generic sun4u sparc SUNW,Ultra-2

But will occur on any platform

Note: I search the bug reports, etc. I humbly appologize if this has already been reported

and I missed it.
Configure in version 1.2.4 has six(6) exit 1's in it, but the secound line of Configure is
trap 'rm -f $tmpfile; exit' 0 1 2 3 15

notice no argument to exit.

now, consulting the man page for exit gives
     exit [ n ]

     exit will cause the calling shell or shell  script  to  exit
     with  the  exit  status specified by n.  If n is omitted the
     exit status is that of the last  command  executed  (an  EOF
     will also cause the shell to exit.)

since the last command executed is rm and the temp file exists, Configure returns 
a 0 even if there was an error and Configure tried to exit with a 1 (trap called 
with exit code = 1)
Set your path such that there is no cc compilier, run Confgure and examine the exit code
the script I used was:

echo $?
here is a diff, <is the original Config, >is the changes I made
diff Configure.orig Configure
< trap 'rm -f $tmpfile; exit' 0 1 2 3 15
> trap 'rm -f $tmpfile; exit $exitCode' 0 1 2 3 15
>       exitCode=1
>       exitCode=1
>   exitCode=1
>    exitCode=1
>         exitCode=1
>             exitCode=1

which is to say, add $exitCode to the trap and place an exitCode=1 before each exit 1

View raw message