Make Subprocess movable
authorAlexey Spiridonov <lesha@fb.com>
Tue, 19 May 2015 23:36:35 +0000 (16:36 -0700)
committerViswanath Sivakumar <viswanath@fb.com>
Wed, 20 May 2015 17:57:12 +0000 (10:57 -0700)
commit0e7cb3feec43284e953bb3c555802a076df78085
tree65d297d44bce5c69fd7bc6ee8f87a61fa75b555d
parent461cac77848578910c62ef43d73fe881a16380ef
Make Subprocess movable

Summary:
Subprocess doesn't have any non-movable members, and its implementation does not take addresses of the object, so I think it's safe. Move makes a bunch of code cleaner (you no longer have to wrap it in `std::unique_ptr` with associated clumsiness).

https://phabricator.fb.com/diffusion/FBCODE/browse/master/folly/Subprocess.h

Test Plan:
- unit test
- Searched for `this` in `Subprocess.{h,cpp}`.
- Inspected member variables: `pid_`, `returnCode_`, `pipes_`
- contbuild

Reviewed By: davejwatson@fb.com

Subscribers: folly-diffs@, yfeldblum, chalfant

FB internal diff: D2079167

Signature: t1:2079167:1432048688:26f96e29310298f47a9a9a7abef22dc863f68942
folly/Subprocess.cpp
folly/Subprocess.h
folly/test/SubprocessTest.cpp