proper signal handling
proper exit handling for subprocesses