Add pollWithRusage to Subprocess
authorVictor Loh <vloh@fb.com>
Wed, 10 May 2017 06:24:57 +0000 (23:24 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 10 May 2017 06:39:37 +0000 (23:39 -0700)
commit31751bbfd5578b5164bc4ed5f1e6d84d87d8a736
tree2005bb227befe180fd685f6dfb809bfa748c7c46
parent646be295ec66750e0d17bf24bd8817c4a4abb1e0
Add pollWithRusage to Subprocess

Summary:
I was looking for a way to get rusage of a particular pid because
getrusage isn't good enough since it records the rusage of all the children
that has been terminated (and waited for). Even though wait4 is marked as
deprecated, wait3 (the cousin of wait4) is still being used in places like
time. Furthermore, there is no suitable replacement to get rusage with wait*.

Reviewed By: yfeldblum

Differential Revision: D5008084

fbshipit-source-id: 6e511ebec7464d21309e5112aca95083e9307ea1
folly/Subprocess.cpp
folly/Subprocess.h