diff options
author | simonmar <unknown> | 2001-01-16 14:06:14 +0000 |
---|---|---|
committer | simonmar <unknown> | 2001-01-16 14:06:14 +0000 |
commit | ba44023202adf345a7b29af3050bfafd336b5b58 (patch) | |
tree | f3a6c60004765e20f9d782159233f9b217b6ec46 /ghc/lib/std/cbits/setBuffering.c | |
parent | d6214fb69dcf14826a1835ec16cf58939469f25b (diff) | |
download | haskell-ba44023202adf345a7b29af3050bfafd336b5b58.tar.gz |
[project @ 2001-01-16 14:06:14 by simonmar]
Fix a problem with our use of tcsetattr() which caused background
processes to stop when the buffering mode, or the echo status, was
changed.
tcSetAttr() is a wrapper around tcsetattr() that temporarily blocks
SIGTTOU around the call.
Diffstat (limited to 'ghc/lib/std/cbits/setBuffering.c')
-rw-r--r-- | ghc/lib/std/cbits/setBuffering.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ghc/lib/std/cbits/setBuffering.c b/ghc/lib/std/cbits/setBuffering.c index 26bfd24b51..2bb240bec1 100644 --- a/ghc/lib/std/cbits/setBuffering.c +++ b/ghc/lib/std/cbits/setBuffering.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: setBuffering.c,v 1.8 2000/04/14 16:19:43 rrt Exp $ + * $Id: setBuffering.c,v 1.9 2001/01/16 14:06:14 simonmar Exp $ * * hSetBuffering Runtime Support */ @@ -37,7 +37,6 @@ setBuffering(StgForeignPtr ptr, StgInt size) int input, isaterm; struct termios tio; struct stat sb; - /* First off, flush old buffer.. */ if ( (fo->flags & FILEOBJ_WRITE) ) { @@ -83,7 +82,7 @@ setBuffering(StgForeignPtr ptr, StgInt size) tio.c_lflag &= ~ICANON; tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; - if (tcsetattr(fo->fd, TCSANOW, &tio) < 0) { + if (tcSetAttr(fo->fd, TCSANOW, &tio) < 0) { cvtErrno(); stdErrno(); return -1; @@ -138,7 +137,7 @@ setBuffering(StgForeignPtr ptr, StgInt size) return -1; } tio.c_lflag |= ICANON; - if (tcsetattr(fo->fd, TCSANOW, &tio) < 0) { + if (tcSetAttr(fo->fd, TCSANOW, &tio) < 0) { cvtErrno(); stdErrno(); return -1; |