Eliminate the use of os.chdir() when running a command
This issue was originally created at: 2009-02-24 13:52:53.
This issue was reported by: stevenknight.
stevenknight said at 2009-02-24 13:52:53
The SCons man page warns against using the 'chdir' parameter to a builder call if SCons will be invoked with the
-joption to run jobs in parallel.It would be preferable if SCons had a check where the chdir parameter is parsed, which warns that because jobs are running in parallel, it's changing the directory for ALL jobs, not just the one running the current builder.
gregnoel said at 2009-03-05 15:13:16
Bug party triage. Retain this issue to document the restriction and issue a warning when chdir is used with
-jN. Create another issue to explore if abusingSideEffect()could be used to serialize uses of chdir, even when-jNis used.
stevenknight said at 2009-11-10 18:00:19
stevenknight => issues@scons
gregnoel said at 2010-07-21 17:22:11
Bug party triage. Steven to create an issue to convert command execution to use
subprocess()and make this issue depend on it. This issue is now to remove the use ofos.chdir()when running a command and instead use thechdir=option ofsubprocess()to set the working directory, thus allowing multiple programs to be run in different directories at the same time. The summary has been changed to reflect this new tasking.
garyo said at 2012-09-01 10:01:49
Bumping all old issues targeted for past releases to 2.x.
This issue caught me out last week. Can we tag this against a new 3.1 milestone? I might be able to look into this.
The version # of the next release is in flux. But please go ahead and work on this. It'll make it into the next release after you complete with requisite tests and any needed doc changes.