How can ncat
be used to spawn a process in the background? For example:
ncat -lp 2342 -c "setsid sleep 5 &"
As I understand, setsid
and &
will make the process run in the background but ncat
does not close until sleep
finishes. I can forcefully close ncat
and sleep
will still run. How can I make ncat
close immediately while still having sleep
run in the background?