Change child's working directory
authorAlexey Spiridonov <lesha@fb.com>
Thu, 10 Apr 2014 07:26:23 +0000 (00:26 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 18 Apr 2014 19:04:14 +0000 (12:04 -0700)
commit188e13f3c8e30d54728baab3d93a61dce9711fa9
treed308ca2a8dff77a2169af41d5280547609b36650
parenta6e257a52099066cd8baf2f942412aa51fcede10
Change child's working directory

Summary: Changing the parent's WD is prone to race conditions of various sorts, and needlessly alters parent state. Python's subprocess also has this feature.

Test Plan: fbmake dbg _bin/folly/test/subprocess_test ; ../_bin/folly/test/subprocess_test

Reviewed By: agoder@fb.com

FB internal diff: D1269526
folly/Subprocess.cpp
folly/Subprocess.h
folly/test/SubprocessTest.cpp