Change how stdin and stdout are closed
We only close the descriptors when run on the background, while we keep them on the foreground so commands like CTLR+C can be sent. We also do not close them (again) on the worker process as this could close other unrelated descriptors.
Resolves: #394 (closed)
Signed-off-by: Nikos Mavrogiannopoulos n.mavrogiannopoulos@gmail.com