Path: utzoo!attcan!uunet!aplcen!haven!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: ioctl() stops working with Patch 9-12 Message-ID: <2969@uvaarpa.virginia.edu> Date: 2 Mar 90 20:34:42 GMT Sender: mmdf@uvaarpa.virginia.edu Reply-To: worley@compass.com Lines: 29 I just installed patch 9-12 and the following fragment of code has stopped working: # set CBREAK, so we can read the responses from the shelltool to $queryiconified do '/compass/c/worley/perl-3.0/ioctl.pl'; $sgttyb_t = "ccccs"; # 4 chars and a short if (ioctl(STDIN,$TIOCGETP,$sgttyb)) { @ary = unpack($sgttyb_t,$sgttyb); $ary[4] |= $CBREAK; $sgttyb = pack($sgttyb_t,@ary); ioctl(STDIN,$TIOCSETP,$sgttyb) || die "Can't ioctl: $!"; } The message I get is: Can't ioctl: Inappropriate ioctl for device at /compass/c/worley/bin/lpq.pl line 41. The purpose of the code is to set CBREAK on STDIN. I'm running SunOS 4.0.3 (BSD 4.2) on a Sun 3/50. Since I don't know much about I/O programming on Unix or the internals of Perl, might someone out there know what the problem is? Thanks, Dale Worley Compass, Inc. worley@compass.com -- Do you believe in therapy? -- Sex, Lies, and Videotape