Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!zaphod.mps.ohio-state.edu!samsung!olivea!orc!inews!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: Starting a daemon on a SVR3 Message-ID: <1990Dec31.224127.2227@chinet.chi.il.us> Date: 31 Dec 90 22:41:27 GMT References: <25360@adm.brl.mil> Organization: Chinet - Public Access UNIX Lines: 18 In article <25360@adm.brl.mil> wolf@grasp1.univ-lyon1.fr writes: >On an old AIX, I use following code to start a daemon (which does not run >with root privileges). > ioctl(i,TIOCNOTTY,(char *)0); >The ioctl call does also not exist, and I found no equivalence. >After having executed the new code it loads itself in background and >ps shows me it does not depend anymore on a tty. Despite this, when >I loggoff, the process is being killed. You need setpgrp() to disassociate from the inherited process group. The next tty the process opens becomes the controlling terminal for the new process group, so you may have to watch out for unexpected signals. Les Mikesell les@chinet.chi.il.us