Re: daemonizing without setsid()



Ivan Gotovchits <ivan.gotovchits@xxxxxxxxx> writes:

Unfortunately, I cannot use it in my operation system ((
Well, it is available of course in it, but is not available in the
production mode.

So it's not really UNIX or is it some older variant?

There's also the older sequence of:

fd = open("/dev/tty", O_RDWR);
ioctl(fd, TIOCNOTTY, 0);
close(fd);

which should also rid you of the controlling tty.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.