Closed
Bug 818366
Opened 13 years ago
Closed 13 years ago
Ability to pass through file descriptors to child processes
Categories
(Firefox Build System :: Mach Core, enhancement)
Firefox Build System
Mach Core
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla20
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(1 file)
|
5.09 KB,
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
Mach isn't playing well with child processes that need full control over the standard file descriptors (stdin, stdout, stderr). This patch adds a process execution mode that uses subprocess instead of mozprocess to work around mozprocess's special handling of the standard file descriptors.
In my ideal world, mozprocess would offer this backdoor and we would never have to call subprocess. That being said, I think this is the path of least resistance today. If mozprocess ever develops this ability, we should convert mach to use mozprocess for everything again.
Attachment #688591 -
Flags: review?(jhammel)
Comment 1•13 years ago
|
||
We went through this same thing for the same reason in bug 746239, and jhammel wound up with the same solution.
Updated•13 years ago
|
Attachment #688591 -
Flags: review?(jhammel) → review+
| Assignee | ||
Comment 2•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 3•12 years ago
|
||
This is causing failure in Jenkins CI for firefox OS automation in TPE CI server.
The reason of failure:
Jenkins CI is not using shell, and nothing matches in the following logic. It would throw an exception of "Could not detect environment shell!".
if 'SHELL' in os.environ:
_current_shell = os.environ['SHELL']
elif 'MOZILLABUILD' in os.environ:
_current_shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe'
elif 'COMSPEC' in os.environ:
_current_shell = os.environ['COMSPEC']
else:
raise Exception('Could not detect environment shell!')
The solution:
Do "export SHELL=/bin/bash", or just use injection of environment variable
http://release1-qa.corp.tpe1.mozilla.com:8080/job/B2G.master.unagi/7/
Updated•12 years ago
|
Assignee: nobody → gps
Comment 4•12 years ago
|
||
Walter: that doesn't actually seem relevant to this bug. It sounds like you're talking about this Pymake code:
http://mxr.mozilla.org/mozilla-central/source/build/pymake/pymake/util.py#38
The only supported build environment on Windows is the Mozillabuild shell. If you're trying to build in some other environment you are going to have a bad time.
Comment 5•12 years ago
|
||
So, while we (=A*Team, Mozbase firing squad) have been fairly slow at addressing the many needed mozprocess bugs (see bug 881421 for a rough attempt at triage) I would like to aim (as priority/time permits) to make this sort of thing possible sans consumer refactor. Thoughts?
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•