scons icon indicating copy to clipboard operation
scons copied to clipboard

Eliminate the use of os.chdir() when running a command

Open bdbaddog opened this issue 8 years ago • 2 comments

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 -j option 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 abusing SideEffect() could be used to serialize uses of chdir, even when -jN is 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 of os.chdir() when running a command and instead use the chdir= option of subprocess() 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.

bdbaddog avatar Jan 02 '18 13:01 bdbaddog

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.

ajf58 avatar Mar 02 '18 19:03 ajf58

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.

bdbaddog avatar Mar 04 '18 19:03 bdbaddog