diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-30 16:58:31 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-30 16:58:31 +0100 |
commit | 5db88aa16bdda504f4bc00fadcd2e27d55c2f63e (patch) | |
tree | 7825613d61fbc85eb03d959b5789d5874ecdc853 /System | |
parent | d17b03d4d4525103f1995441045eae4c2c73355d (diff) |
Change `drainOutput`'s `tcdrain(3)` into a `safe` FFI call
Since the primary purpose of `tcdrain(3)` is to block it makes much more
sense to use a `safe` FFI import.
Diffstat (limited to 'System')
-rw-r--r-- | System/Posix/Terminal/Common.hsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/System/Posix/Terminal/Common.hsc b/System/Posix/Terminal/Common.hsc index 4825b10..68ce321 100644 --- a/System/Posix/Terminal/Common.hsc +++ b/System/Posix/Terminal/Common.hsc @@ -421,7 +421,7 @@ drainOutput :: Fd -> IO () #if HAVE_TCDRAIN drainOutput (Fd fd) = throwErrnoIfMinus1_ "drainOutput" (c_tcdrain fd) -foreign import capi unsafe "termios.h tcdrain" +foreign import capi safe "termios.h tcdrain" c_tcdrain :: CInt -> IO CInt #else {-# WARNING drainOutput |