Bug 842280

Summary: posix_spawn() invokes sh when it should not
Product: Red Hat Enterprise Linux 6 Reporter: Michal Hlavinka <mhlavink>
Component: glibcAssignee: Patsy Griffin <pfrankli>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: fweimer, law, mcermak, mfranc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-06 03:38:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reproducer
none
Potential fix none

Description Michal Hlavinka 2012-07-23 10:51:40 UTC
Created attachment 599753 [details]
reproducer

Description of problem:
posix_spawn() executes sh when it can't execute it's argument. This breaks ksh build time tests

Version-Release number of selected component (if applicable):
glibc-2.12-1.84.el6

How reproducible:
always

Steps to Reproduce:
1. gcc -o repr reproducer.c
2. ./repr
3.
  
Actual results:
"ENOEXEC invokes sh"

Expected results:
"ENOEXEC produces exist status 127 => GOOD"

Additional info:
It works in Fedora

Comment 3 Jeff Law 2012-08-06 19:06:42 UTC
Created attachment 602562 [details]
Potential fix

Comment 5 Jeff Law 2012-09-06 03:38:12 UTC
Sorry, but after further technical review, this bug is being closed as WONTFIX.

The fundamental problem is fixing this issue would require an ABI change in glibc.  Effectively we'd have to export a glibc-2.15 ABI, which is not a change suitable for RHEL 6 which utilizes glibc-2.12.  For technical reasons it is not possible to introduce a glibc-2.12.1 ABI.

FWIW this will work correctly in RHEL 7 which uses glibc-2.16.