i want to detach command either with 'command &' in the end, or with 'nohup command &', but it stops right after detaching it.
command is little specific, if it receives eof on input, it breaks so /dev/null as input will lead to end and solution that usualy works:
$ command < /dev/null > /dev/null 2>&1 &
not working...
is there other device in unix/linux, that can replace /dev/null and behave like empty input, but not sending eof.
(by the way, command is very useful multicasting tool emcast, I can try patching it my self, or find patched version for this purpose... but it seems that problem can be solved outside)
I'm adding this EDIT to make my question more clear. I made this C program of 2 lines that works perfectly: program name is "donothing"
#include <unistd.h>
int main() { while (1) { sleep(10); } return 0; }
and it is what I am looking for, some device/program, that doing nothing, but leave its stdout open. Both ("command & ... disown" and "nohup command &") works.
$ donothing | mycommand >/dev/null &
$ disown %1
works well, so now question is only: what unix device/program behaves like my 'donothing'.