home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / hp / 9463 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  1.4 KB

  1. Path: sparky!uunet!pipex!unipalm!uknet!mcsun!sunic!corax.udac.uu.se!irfu.se!jhd
  2. From: jhd@irfu.se (Jan D.)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: POSIX enhancements since HP-UX 6.5:  how affects daemonization?
  5. Keywords: fork() setsid()
  6. Message-ID: <1992Aug19.213219.8691@irfu.se>
  7. Date: 19 Aug 92 21:32:19 GMT
  8. References: <1992Aug19.195733.6344@bmers145.bnr.ca>
  9. Organization: Swedish Institute of Space Physics, Uppsala, Sweden
  10. Lines: 21
  11.  
  12. In article <1992Aug19.195733.6344@bmers145.bnr.ca> tpc@bnr.ca writes:
  13. >Well, here we go, kicking and screaming into the '90s... :-)
  14. >
  15. >The last time I touched applications in HP-UX 6.5  I had to write a daemon,
  16. >and used Dave Lennert's UnixWorld article (Dec88) to good advantage.  That
  17. >was pre-POSIX.  From what I can tell, for HP-UX 8.0, aside from setpgrp now
  18. >being setsid(), we *still* have to fork() twice (to ensure opening a tty
  19. >doesn't become a controlling tty).  One thing leaves me uneasy:  it used to
  20.  
  21. In POSIX, if you don't want to get a controlling tty, open it with the
  22. O_NOCTTY flag or:ed in: open(name, O_RDONLY|O_NOCTTY);
  23.  
  24. >be that orphans (as we forcibly created in pre-POSIX) got PGRP==0; that's
  25. >not valid under POSIX, so they retain the old PGRP.  Does this also mean that
  26. >they can acquire a controlling tty, or does the old mechanism work (for
  27. >modified reasons)?
  28. >
  29. I don't know about this, but I wouldn't use the old mechanism even if it
  30. would work. It will probably go away in the future.
  31.  
  32.     Jan D.
  33.