catch both 'error' and 'exit'
add content-length for PATCH requests
Merge pull request #29 from andreineculau/add-content-length-to-patch

add content-length for PATCH requests
trap exits and save Pid in stop reason
handle 'done' from unknown processes (after manager restart)
Merge remote-tracking branch 'github.mabrek/catch-exit'