[bug #63070] posix_spawn fails to run a child process.

2022-09-25 Thread Paul D. Smith
Update of bug #63070 (project make): Status:None => Fixed Open/Closed:Open => Closed Fixed Release:None => SCM Triage Status:

Re: [bug #63070] posix_spawn fails to run a child process.

2022-09-21 Thread Edward Welbourne
Alejandro Colomar (21 September 2022 11:46) >> If the function is returning 0, there's no error, and errno shouldn't be read > I guess you maybe didn't state it here as obvious, but to me it's not by > reading the conversation: Apart from posix_spawn(3) returning 0 and setting > errno to ENOEXEC,

[bug #63070] posix_spawn fails to run a child process.

2022-09-21 Thread Alejandro Colomar
Follow-up Comment #14, bug #63070 (project make): [comment #10 comment #10:] > In glibc-2.17 posix_spawn returns 0 whether POSIX_SPAWN_USEVFORK is set or not. > When POSIX_SPAWN_USEVFORK is not set posix_spawn returns 0 and errno is 0. > When POSIX_SPAWN_USEVFORK is set posix_spawn returns 0 and

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Dmitry Goncharov
Follow-up Comment #13, bug #63070 (project make): There is nothing to be sorry about, Martin. Thank you for your work, keep contributing. ___ Reply to this item at:

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Dmitry Goncharov
Follow-up Comment #10, bug #63070 (project make): In glibc-2.17 posix_spawn returns 0 whether POSIX_SPAWN_USEVFORK is set or not. When POSIX_SPAWN_USEVFORK is not set posix_spawn returns 0 and errno is 0. When POSIX_SPAWN_USEVFORK is set posix_spawn returns 0 and errno is ENOEXEC. However, today

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Martin Dorey
Follow-up Comment #12, bug #63070 (project make): Ah, so the cause was as noted in https://savannah.gnu.org/bugs/?57022#comment5: > I leaked a copy of the filename because I'm really a C++ programmer, whose string literals are const. Thanks for sorting it out, Dmitry, and sorry for the

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Dmitry Goncharov
Follow-up Comment #11, bug #63070 (project make): Patch 3 tested on glibc-2.17, glibc-2.32 and sun os. ___ Reply to this item at: ___ Message sent via

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Dmitry Goncharov
Additional Item Attachment, bug #63070 (project make): File name: sv63070_fix3.diff Size:1 KB ___ Reply to this item at:

[bug #63070] posix_spawn fails to run a child process.

2022-09-20 Thread Paul D. Smith
Follow-up Comment #9, bug #63070 (project make): Sorry Dmitry I'm still really confused. Maybe it would help if you made more clear what you discovered. GNU make always sets POSIX_SPAWN_USEVFORK if it exists, and it does exist in all versions of glibc we are discussing. You have discovered

[bug #63070] posix_spawn fails to run a child process.

2022-09-18 Thread Dmitry Goncharov
Follow-up Comment #8, bug #63070 (project make): However, maybe we should also define _GNU_SOURCE in the configure check before including #include . Something like index ec8b4c13..38418142 100644 --- a/configure.ac +++ b/configure.ac @@ -369,6 +369,7 @@ AS_IF([test "$make_cv_posix_spawn" =

[bug #63070] posix_spawn fails to run a child process.

2022-09-18 Thread Dmitry Goncharov
Follow-up Comment #7, bug #63070 (project make): Let me describe differently. posix_spawn calls either vfork or clone, depending on arguments being passed. See the man page referenced above. I observed that when posix_spawn calls vfork, that's is when POSIX_SPAWN_USEVFORK is set in flags, errno

[bug #63070] posix_spawn fails to run a child process.

2022-09-18 Thread Paul D. Smith
Follow-up Comment #6, bug #63070 (project make): I'm not sure I understand the change being made. POSIX_SPAWN_USEVFORK *is* definitely defined in glibc 2.17: I'm looking at the source for that release right now and see it. It's set if __USE_GNU is set: /* Flags to be set in the

[bug #63070] posix_spawn fails to run a child process.

2022-09-18 Thread Dmitry Goncharov
Additional Item Attachment, bug #63070 (project make): File name: sv63070_fix2.diff Size:1 KB ___ Reply to this item at:

[bug #63070] posix_spawn fails to run a child process.

2022-09-18 Thread Dmitry Goncharov
Follow-up Comment #5, bug #63070 (project make): posix_spawn calls either vfork of spawn. On glibc-2.17 i observed that when posix_spawn calls vfork the return code is zero, but errno is set to ENOEXEC. When posix_spawn calls spawn, both return code and errno are zero. This man page

[bug #63070] posix_spawn fails to run a child process.

2022-09-17 Thread Martin Dorey
Follow-up Comment #4, bug #63070 (project make): > it's not feasible to test the runtime behavior of posix_spawn() in configure Despite it being "problematic", isn't that how we solved the not entirely dissimilar bug #57022 (Error 127 executing a script with no #!) in

[bug #63070] posix_spawn fails to run a child process.

2022-09-17 Thread Paul D. Smith
Follow-up Comment #3, bug #63070 (project make): This is strange. I looked in the glibc bug tracker and couldn't find anything about this issue. I also looked at the actual implementation of glibc 2.17 and it doesn't seem to me like this should happen (although I'm not a glibc developer so I

[bug #63070] posix_spawn fails to run a child process.

2022-09-16 Thread anonymous
Follow-up Comment #2, bug #63070 (project make): No, if posix_spawn() returns zero then then errno's value is unspecified and any checks againstĀ it are invalid resulting in false positives.If some versions of glibc have posix_spawn() return 0 when they did not create the targetĀ process then the

[bug #63070] posix_spawn fails to run a child process.

2022-09-16 Thread Dmitry Goncharov
Additional Item Attachment, bug #63070 (project make): File name: sv63070_fix.diff Size:1 KB ___ Reply to this item at:

[bug #63070] posix_spawn fails to run a child process.

2022-09-16 Thread Dmitry Goncharov
Follow-up Comment #1, bug #63070 (project make): posix_spawn fails to run a child process. Some versions of glibc (i observed this with glibc-2.17) fail to spawn a shell program missing a shbang and return 0 from posix_spawn. $ ls hello.sh makefile $ cat hello.sh printf "hello, world\n" $

[bug #63070] posix_spawn fails to run a child process.

2022-09-16 Thread Dmitry Goncharov
URL: Summary: posix_spawn fails to run a child process. Project: make Submitter: dgoncharov Submitted: Sat 17 Sep 2022 01:23:19 AM UTC Severity: 3 - Normal Item