Fix a possible deadlock
gauge_close will hang if the process spawns a new child after gauge_start and the child does not terminate before gauge_stop. This cannot be fixed for all cases. When forking, the child process should close all open file descriptors that it does not need, but there is a way to automatically close an fd if an exec() is executed.
Showing with 17 additions and 1 deletion