home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / openloo / 3806 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  1.4 KB

  1. Path: sparky!uunet!sun-barr!olivea!gossip.pyramid.com!pyramid!unify!openlook!openlook-request
  2. From: sinan@Mtesol.boeing.com (Sinan Karasu)
  3. Newsgroups: comp.windows.open-look
  4. Subject: XView3 on concurrent again
  5. Message-ID: <f8me8p@openlook.Unify.Com>
  6. Date: 11 Sep 92 20:44:36 GMT
  7. Sender: news@Unify.Com
  8. Lines: 33
  9.  
  10. Here is the snippet of code that I was talking about
  11. (this is from libxview/ttysw/tty_init.c )
  12.  
  13. When this gets executed on a concurrent (SVR3 + BSD 4.3 ? )
  14. the stuff program sends to STDOUT still goes to the parent
  15. xterm.Remember that we are NOT doing a setsid (it does not
  16. exist on concurrent) we do a setpgrp(0,0) instead....
  17.  
  18. Thanx for any responses I may get....
  19. Sinan
  20. I wonder if the problem is with printf ??? hmmm....
  21.  
  22. -------------------------------------------------------------------
  23.  
  24.  
  25.     vec.sv_handler = SIG_DFL;
  26.     vec.sv_mask = vec.sv_onstack = 0;
  27.     sigvec(SIGWINCH, &vec, 0);
  28.     /*
  29.      * Become session leader, change process group of child
  30.      * process (me at this point in code) so
  31.      * its signal stuff doesn't affect the terminal emulator.
  32.      */
  33.     setsid();
  34.     vec.sv_handler = SIG_IGN;
  35.     vec.sv_mask = vec.sv_onstack = 0;
  36.     sigvec(SIGTTOU, &vec, &ovec);
  37.  
  38.     close(ttysw->ttysw_tty);
  39.  
  40.     /* Make the following file descriptor be my controlling terminal */
  41.     ttysw->ttysw_tty = open("/dev/tty", O_RDWR, 0);  /* open master tty* */
  42.     sigvec(SIGTTOU, &ovec, 0);
  43.