Ya u r rite i have one boolean check like this
This is sample code.
#define TERMINALMASK 0 or 1
int main ()
if (TERMINALMASK == SET)
fd = open("/dev/null", O_RDWR);
When i get message from other process or i get user input to change file content
open a file
i want to run my process like deamon. The user should not know weather it is running or not.
So if i assign output and error fd to /dev/null it wont create problem.
I want to know is it proper to assign input fd to /dev/null?