Allow Process::reset to keep callbacks unchanged. Also init errorNum
(cherry picked from commit 7763123d621812e5475f63a1186b5f2ad019b33f)
Ensure file descriptors are closed when resetting Process object.
(cherry picked from commit e86b845bb66cb5923edc36ab5acab2a9665c9ec9)
Adds a lsof like utility function.
(cherry picked from commit bba0f2ca158532590a53b5d8ad39108ed6d8ee4c)