home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!wariat!x10siv!serges
- From: serges@x10siv.wariat.org (Sergio Stewart)
- Subject: Setsid() ???
- Message-ID: <Bs31DD.6FB@x10siv.wariat.org>
- Summary: How do I resolve setsid() on Sun386i?
- Keywords: setsid sun386i X11R5
- Organization: +X10siv Sub Ord of volaire+
- Date: Tue, 28 Jul 1992 04:48:47 GMT
- Lines: 48
-
- Hey guys,
-
- For the last few nights Ive been re-building XView3.0 on my Sun386i,
- and Ive run into a hitch. After applying the two major/only patches
- for Xview, my progress has come to a halt, due to a call to "setsid()"
- in the file <XView3.0>/lib/libxview/ttysw/tty_init.c.
- Heres the code fragment:
-
- --
- #ifndef SVR4 /* SunOS4.x code */
- vec.sv_handler = SIG_DFL;
- vec.sv_mask = vec.sv_onstack = 0;
- sigvec(SIGWINCH, &vec, 0);
- /*
- * Become session leader, change process group of child
- * process (me at this point in code) so
- * its signal stuff doesn't affect the terminal emulator.
- */
- setsid(); <-- the culprit.
- vec.sv_handler = SIG_IGN;
- vec.sv_mask = vec.sv_onstack = 0;
- sigvec(SIGTTOU, &vec, &ovec);
-
- close(ttysw->ttysw_tty);
-
- /* Make the following file descriptor be my controlling terminal */
- ttysw->ttysw_tty = open("/dev/tty", O_RDWR, 0); /* open master tty* */
- sigvec(SIGTTOU, &ovec, 0);
-
- #else SVR4 /* SVR4 code */
- --
- I am building with X11R5 libs and widgets, and compiling with the standard
- cc.
-
- The odddd thing about this, is that the comment plainly says
- "SunOS4.x code"? My Sun386i is standard SunOS 4.0.2, complete with
- everything except setsid(). Whats going on here. Is this just for
- SunOS 4.1.x? Surely, theres a fix around this.
-
- Any ideas.
-
- Thanx,
-
- --
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- \\ Serge Stewart | serges@x10siv.wariat.org \\
- \\ -------------------------- | "Im neither impressed or obsessed \\
- \\ Kansas City,Missouri 64130 | with stereotypes" -Butch \\
-