🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #572

(none)

#572
From: Thomas M. Breuel
Date: Mon, 11 Sep 1989 01:14
31 lines
940 bytes
The following code from nojobs.c won't compile under HPUX
(and probably not under SysV either):

/* Fill the contents of shell_tty_info with the current tty info. */
get_tty_state ()
{
  int tty = open ("/dev/tty", O_RDONLY);
  if (tty != -1)
    {
      ioctl (tty, TIOCGETP, &shell_tty_info);
      close (tty);
    }
}

/* Make the current tty use the state in shell_tty_info. */
set_tty_state ()
{
  int tty = open ("/dev/tty", O_RDONLY);
  if (tty != -1)
    {
      ioctl (tty, TIOCSETN, &shell_tty_info);
      close (tty);
    }
}






^C
Technical Details
Message-ID: <8909110114.AA05031@wilde.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!AI.MIT.EDU!tmb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!AI.MIT.EDU!tmb
From: tmb@AI.MIT.EDU (Thomas M. Breuel)
Newsgroups: gnu.bash.bug
Subject: (none)
Message-ID: <8909110114.AA05031@wilde.ai.mit.edu>
Date: 11 Sep 89 01:14:59 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 31