This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/82233] [6/7/8 Regression] execute_command_line causes program to stop when command fails (or does not exist)
- From: "clyon at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Oct 2017 15:36:13 +0000
- Subject: [Bug libfortran/82233] [6/7/8 Regression] execute_command_line causes program to stop when command fails (or does not exist)
- Auto-submitted: auto-generated
- References: <bug-82233-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82233
--- Comment #14 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I think I understand the problem better now, after a few experiments, and a
discussion with proot's author.
The testcase finishes with a call to execute_command_line with wait=.false, so
the main process may complete before the child (execute_command_line) does.
In such a case, proot returns the exit code of the last living process, the
child in our case, so 127 (command not found). And sometimes it can return 0,
depending on the process scheduling on the host.
Forcing qemu to dump traces seems to hide the problem, probably because it does
change the process schedule.
FWIW, I can live with this by flagging this test as 'random' in my
GCC-regression testing.
Removing the last
call execute_command_line(command , wait=.false., exitstat=i)
or moving it before
call execute_command_line(command , exitstat=i, cmdstat=j)
seems to workaround the issue for me.