||05-09-2010 02:51 PM
is there a way to tell if a C program is running without a terminal?
I have a C program that can run disconnected ( like most ), is there a programmatical way to tel if the program is running without a terminal? Example:
nohup my-program &
What I want is to modify the program so it can be used as a HUB interface. It does Peer to Peer communication and I want to make it a server function with a command line option. Currently if I disconnect the program, it will loop on the read for stdin, I need to be able to detect that and go into 'HUB' mode.