home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / misc / 3362 < prev    next >
Encoding:
Text File  |  1992-07-27  |  2.0 KB  |  60 lines

  1. Newsgroups: comp.sys.sun.misc
  2. Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!wariat!x10siv!serges
  3. From: serges@x10siv.wariat.org (Sergio Stewart)
  4. Subject: Setsid() ???
  5. Message-ID: <Bs31DD.6FB@x10siv.wariat.org>
  6. Summary: How do I resolve setsid() on Sun386i? 
  7. Keywords: setsid sun386i X11R5 
  8. Organization:  +X10siv Sub Ord of volaire+ 
  9. Date: Tue, 28 Jul 1992 04:48:47 GMT
  10. Lines: 48
  11.  
  12. Hey guys,
  13.  
  14. For the last few nights Ive been re-building XView3.0 on my Sun386i,
  15. and Ive run into a hitch. After applying the two major/only patches
  16. for Xview, my progress has come to a halt, due to a call to "setsid()"
  17. in the file <XView3.0>/lib/libxview/ttysw/tty_init.c. 
  18. Heres the code fragment:
  19.  
  20. --
  21. #ifndef SVR4  /* SunOS4.x code */
  22.     vec.sv_handler = SIG_DFL;
  23.     vec.sv_mask = vec.sv_onstack = 0;
  24.     sigvec(SIGWINCH, &vec, 0);
  25.     /*
  26.      * Become session leader, change process group of child
  27.      * process (me at this point in code) so
  28.      * its signal stuff doesn't affect the terminal emulator.
  29.      */
  30.    setsid();  <-- the culprit. 
  31.    vec.sv_handler = SIG_IGN;
  32.    vec.sv_mask = vec.sv_onstack = 0;
  33.    sigvec(SIGTTOU, &vec, &ovec);
  34.  
  35.    close(ttysw->ttysw_tty);
  36.  
  37.    /* Make the following file descriptor be my controlling terminal */
  38.    ttysw->ttysw_tty = open("/dev/tty", O_RDWR, 0);  /* open master tty* */
  39.    sigvec(SIGTTOU, &ovec, 0);
  40.  
  41. #else SVR4  /* SVR4 code */
  42. --
  43. I am building with X11R5 libs and widgets, and compiling with the standard
  44. cc.
  45.  
  46. The odddd thing about this, is that the comment plainly says 
  47. "SunOS4.x code"? My Sun386i is standard SunOS 4.0.2, complete with 
  48. everything except setsid(). Whats going on here. Is this just for
  49. SunOS 4.1.x? Surely, theres a fix around this.
  50.  
  51. Any ideas.
  52.  
  53. Thanx,
  54.  
  55. -- 
  56. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  57. \\ Serge Stewart              | serges@x10siv.wariat.org              \\ 
  58. \\ -------------------------- | "Im neither impressed or obsessed     \\
  59. \\ Kansas City,Missouri 64130 |  with stereotypes" -Butch             \\
  60.