bug-bash
[Top][All Lists]
Advanced

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

Re: Broken PIPESTATUS with --disable-job-control


From: Felix Janda
Subject: Re: Broken PIPESTATUS with --disable-job-control
Date: Sat, 15 Oct 2016 16:15:25 -0400
User-agent: Mutt/1.6.1 (2016-04-27)

Chet Ramey wrote:
> On 9/18/16 11:20 PM, Felix Janda wrote:
> 
> >>> Notice that the configure script disables job-control when a run-time
> >>> test (which could easily be a built-time test) fails. So by default,
> >>> a cross-compiled bash will have this bug.
> >>
> >> Which test?
> > 
> > I am referring to BASH_SYS_JOB_CONTROL_MISSING.
> 
> Sure.  I'm asking which part of that run-time test can easily be converted
> to a build-time test that handles conditional compilation and definitions.

below a patch to make things more concrete:

--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1357,7 +1357,7 @@
 [AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
 AC_MSG_CHECKING(for presence of necessary job control definitions)
 AC_CACHE_VAL(bash_cv_job_control_missing,
-[AC_TRY_RUN([
+[AC_TRY_COMPILE([
 #include <sys/types.h>
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
@@ -1367,42 +1367,35 @@
 #endif
 #include <signal.h>
 
-/* Add more tests in here as appropriate. */
-main()
-{
 /* signal type */
 #if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
-exit(1);
+#error
 #endif
 
 /* signals and tty control. */
 #if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
-exit (1);
+#error
 #endif
 
 /* process control */
 #if !defined (WNOHANG) || !defined (WUNTRACED) 
-exit(1);
+#error
 #endif
 
 /* Posix systems have tcgetpgrp and waitpid. */
 #if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
-exit(1);
+#error
 #endif
 
 #if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
-exit(1);
+#error
 #endif
 
 /* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
 #if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
-exit(1);
+#error
 #endif
-
-exit(0);
-}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
-    [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to 
missing)
-     bash_cv_job_control_missing=missing]
+], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing
 )])
 AC_MSG_RESULT($bash_cv_job_control_missing)
 if test $bash_cv_job_control_missing = missing; then



reply via email to

[Prev in Thread] Current Thread [Next in Thread]