home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!utcsri!torn!cunews!nrcnet0!bnrgate!bmers145!bnr.ca!tpc
- From: tpc@bnr.ca (Thomas P. Chmara)
- Subject: POSIX enhancements since HP-UX 6.5: how affects daemonization?
- Message-ID: <1992Aug19.195733.6344@bmers145.bnr.ca>
- Keywords: fork() setsid()
- Sender: news@bmers145.bnr.ca
- Reply-To: tpc@bnr.ca
- Organization: Bell-Northern Research Ltd.
- Date: Wed, 19 Aug 92 19:57:33 GMT
- Lines: 25
-
- Well, here we go, kicking and screaming into the '90s... :-)
-
- The last time I touched applications in HP-UX 6.5 I had to write a daemon,
- and used Dave Lennert's UnixWorld article (Dec88) to good advantage. That
- was pre-POSIX. From what I can tell, for HP-UX 8.0, aside from setpgrp now
- being setsid(), we *still* have to fork() twice (to ensure opening a tty
- doesn't become a controlling tty). One thing leaves me uneasy: it used to
- be that orphans (as we forcibly created in pre-POSIX) got PGRP==0; that's
- not valid under POSIX, so they retain the old PGRP. Does this also mean that
- they can acquire a controlling tty, or does the old mechanism work (for
- modified reasons)?
-
- Any pointers on where I can find the rules and roadmarks for all of this would
- be much appreciated by this crusty old kernel hack. I've got a copy of
- W. Richard Steven's Network Programming, but not UNIX Programming; that's
- still coming...
- ---tpc---
-
-
- --
- I am sole owner of the above opinions. These opinions are furnished without
- warranty or liability expressed or implied. Your mileage may vary.
- -----------------------------------------------------------------------------
- Tom Chmara, P.Eng.| INTERNET: tpc@x400gate.bnr.ca | Fone: (613)765-2925
- BNR Ltd. | | FAX: (613)763-2626
-