Opened 5 years ago

Closed 4 years ago

#141 closed defect (fixed)

python: subprocess.Popen (shell=True) fails

Reported by: dmik Owned by:
Priority: major Milestone:
Component: python Version:
Severity: medium Keywords:


I've just discovered that subprocess.Popen (shell=True) fails with

  File "C:/USR/lib/python2.7/", line 709, in __init__
    errread, errwrite)
  File "C:/USR/lib/python2.7/", line 1328, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

This relates to the current Python version 2.7.6-11.

Change History (4)

comment:1 Changed 5 years ago by dmik

It turns out that python uses a hard-coded shell path /bin/sh when going POSIX way (what a nice decision). However, after recent fixes to spawn/exec in libc 0.6.6 this should work pretty well in our Unix environment. I need to find why it fails.

comment:2 Changed 5 years ago by dmik

LIbc has nothing to do with that. The supbrocess module uses fork() and just passes /bin/sh to it (which it has nothing to do with because it's an "absolute" path). So we should fix Python by replacing /bin/sh with /@unixroot/usr/bin/sh or better even checking the EMXSHELL first and then falling back to a hard-coded value.

comment:4 Changed 4 years ago by dmik

Resolution: fixed
Status: newclosed

This is fixed in r603. I decided to use SHELL that was configured during python build.

Note: See TracTickets for help on using tickets.