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: 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>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <signal.h>

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

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

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

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

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

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


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
necessary.


Felix



reply via email to

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