[Top][All Lists]

[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: Mon, 19 Sep 2016 09:59: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.

Everything could easily be a preprocessor test:

#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <signal.h>

/* signal type */
#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)

/* signals and tty control. */
#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)

/* process control */
#if !defined (WNOHANG) || !defined (WUNTRACED) 

/* Posix systems have tcgetpgrp and waitpid. */
#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)

#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)

/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)

I think that the only reason that it is currently a run-time test is
related to the comment:

/* Add more tests in here as appropriate. */

So it was conceived that in future run-time only tests might be


reply via email to

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