Re: ENOEXEC from exec*() functions...?

2018-07-30 Thread Paul Smith
On Mon, 2018-07-30 at 17:29 +0300, Eli Zaretskii wrote: > > Which doesn't sound like something that would be helped by re- > > running > > as a shell script. Maybe this is a feature of GNU/Linux and other > > systems use ENOEXEC when there's no #! line? > > But in GNU Make, SHELL can be set to

Re: ENOEXEC from exec*() functions...?

2018-07-30 Thread Eli Zaretskii
> From: Paul Smith > Date: Mon, 30 Jul 2018 06:47:38 -0400 > > I can't find a way to exercise this code path. > > If the command being invoked doesn't have the executable bit set (e.g., > I use "touch ./foo" with the above) then exec() fails with errno set to > EPERM not ENOEXEC, and if I make

Re: ENOEXEC from exec*() functions...?

2018-07-30 Thread Paul Smith
On Mon, 2018-07-30 at 13:16 +0200, Andreas Schwab wrote: > On Jul 30 2018, Paul Smith wrote: > > Which doesn't sound like something that would be helped by re- > > running as a shell script. Maybe this is a feature of GNU/Linux > > and other systems use ENOEXEC when there's no #! line? > >

Re: ENOEXEC from exec*() functions...?

2018-07-30 Thread Andreas Schwab
On Jul 30 2018, Paul Smith wrote: > Which doesn't sound like something that would be helped by re-running > as a shell script. Maybe this is a feature of GNU/Linux and other > systems use ENOEXEC when there's no #! line? http://pubs.opengroup.org/onlinepubs/9699919799/functions/execve.html

ENOEXEC from exec*() functions...?

2018-07-30 Thread Paul Smith
While looking into cleanups around fork/exec I ran into some confusing code in GNU make. This code dates back to the first version checked into source control by Roland in 1992 (so who knows how far it really goes back). When an exec() fails, GNU make looks at the errno code and if the code is

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-30 Thread Barath Aron
On 07/30/2018 12:21 PM, Paul Smith wrote: This weekend I reworked the handling of failures in child_execute_job() so that it behaves properly even when the child failure happens in the current process (e.g., the fork() or posix_spawn()). It needs a bit of cleanup--in particular writing a test

Re: [PATCH 2/2] job.c: implementing child_execute_job() using posix_spawn(), and use it if present

2018-07-30 Thread Paul Smith
On Mon, 2018-07-23 at 07:10 +0200, Barath Aron wrote: > On 07/22/2018 09:58 PM, Paul Smith wrote: > > On Mon, 2018-07-09 at 09:05 +0200, Aron Barath wrote: > > > --- > > > > Thanks for the work you put into this! > > You're welcome! :) > > Unfortunately this change reveals some deeper problems

Re: use of math.h / libmath discouraged?

2018-07-30 Thread Edward Welbourne
On Wed, 2018-07-25 at 14:25 -0600, Brian Vandenberg wrote: >> # note: the space before the word TEXT is helpful for readability but causes >> a problem >> $(info $(call F1, TEXT)) Paul Smith (28 July 2018 14:48) replied: > To me this seems like a bug. In GNU make generally the rule is >