Closed muesli closed 5 years ago
Using Start() but not waiting for the command to complete will leave dangling defunct processes that can't be cleaned up until its parent dies.
15660 pts/15 Z+ 0:00 [notify-send] <defunct> 16139 pts/15 Z+ 0:00 [notify-send] <defunct> 16644 pts/15 Z+ 0:00 [notify-send] <defunct> ...
Run() will wait for the command to finish, but cleans up after itself.
Alternatively, we could launch Start() in a go-routine and Wait() for it, but that complicates the error handling.
Using Start() but not waiting for the command to complete will leave dangling defunct processes that can't be cleaned up until its parent dies.
Run() will wait for the command to finish, but cleans up after itself.
Alternatively, we could launch Start() in a go-routine and Wait() for it, but that complicates the error handling.