Moduleunix-2.8.7.0Haskell2010
System.Posix.Terminal.ByteString
POSIX Terminal support
- 7 types
- 29 values
- Packageunix-2.8.7.0
- Exports67
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceByteString.hsc
Terminal support
0 declarationsTerminal attributes
getTerminalAttributes fd calls tcgetattr to obtain
the TerminalAttributes associated with Fd fd.
setTerminalAttributes fd attr ts calls tcsetattr to change
the TerminalAttributes associated with Fd fd to
attr, when the terminal is in the state indicated by ts.
Constructors
InterruptOnBreakBRKINT- Signal interrupt on breakMapCRtoLFICRNL- Map CR to NL on inputIgnoreBreakIGNBRK- Ignore break conditionIgnoreCRIGNCR- Ignore CRIgnoreParityErrorsIGNPAR- Ignore characters with parity errorsMapLFtoCRINLCR- Map NL to CR on inputCheckParityINPCK- Enable input parity checkStripHighBitISTRIP- Strip characterRestartOnAnyIXANY- Enable any character to restart outputStartStopInputIXOFF- Enable start/stop input controlStartStopOutputIXON- Enable start/stop output controlMarkParityErrorsPARMRK- Mark parity errorsProcessOutputOPOST- Post-process outputMapLFtoCRLFONLCR- (XSI) Map NL to CR-NL on outputOutputMapCRtoLFOCRNL- (XSI) Map CR to NL on outputNoCRAtColumnZeroONOCR- (XSI) No CR output at column 0ReturnMeansLFONLRET- (XSI) NL performs CR functionTabDelayMask0TABDLY(TAB0)- (XSI) Select horizontal-tab delays: type 0TabDelayMask3TABDLY(TAB3)- (XSI) Select horizontal-tab delays: type 3LocalModeCLOCAL- Ignore modem status linesReadEnableCREAD- Enable receiverTwoStopBitsCSTOPB- Send two stop bits, else oneHangupOnCloseHUPCL- Hang up on last closeEnableParityPARENB- Parity enableOddParityPARODD- Odd parity, else evenEnableEchoECHO- Enable echoEchoEraseECHOE- Echo erase character as error-correcting backspaceEchoKillECHOK- Echo KILLEchoLFECHONL- Echo NLProcessInputICANON- Canonical input (erase and kill processing)ExtendedFunctionsIEXTEN- Enable extended input character processingKeyboardInterruptsISIG- Enable signalsNoFlushOnInterruptNOFLSH- Disable flush after interrupt or quitBackgroundWriteInterruptTOSTOP- SendSIGTTOUfor background output
Serial line baudrate. The set of supported speeds is system-dependent.
Portable use of the provided pattern synonyms that are outside the list
mandated by POSIX requires #ifdef guards.
Applications may need to be prepared to encounter speeds not known at
compile time, these can be handled generically via the BaudRate
constructor. In other words, the provided pattern synonyms are not
necessarily a COMPLETE set.
All non-zero pseudo-terminal baud rates are functionally equivalent, and
the pty driver may accept any speed within a suitable range. Requested
speeds may be rounded up or down to fit into the supported range.
Instances6Enum, Eq, Num, Ord, Real, Show
Enum BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.CommonEq BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.CommonNum BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.CommonOrd BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.CommonReal BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.CommonShow BaudRateDefined in unix-2.8.7.0 · System.Posix.Terminal.Common
Hang up
1000000 baud, non-POSIX system-dependent extension
110 baud
115200 baud, non-POSIX system-dependent extension
1152000 baud, non-POSIX system-dependent extension
1200 baud
5 baud
150 baud
1500000 baud, non-POSIX system-dependent extension
1800 baud
19200 baud
200 baud
2000000 baud, non-POSIX system-dependent extension
230400 baud, non-POSIX system-dependent extension
2400 baud
2500000 baud, non-POSIX system-dependent extension
300 baud
3000000 baud, non-POSIX system-dependent extension
3500000 baud, non-POSIX system-dependent extension
38400 baud
4000000 baud, non-POSIX system-dependent extension
460800 baud, non-POSIX system-dependent extension
4800 baud
50 baud
500000 baud, non-POSIX system-dependent extension
57600 baud, non-POSIX system-dependent extension
576000 baud, non-POSIX system-dependent extension
600 baud
75 baud
921600 baud, non-POSIX system-dependent extension
9600 baud
Terminal operations
sendBreak fd duration calls tcsendbreak to transmit a
continuous stream of zero-valued bits on Fd fd for the
specified implementation-dependent duration.
drainOutput fd calls tcdrain to block until all output
written to Fd fd has been transmitted.
Throws IOError ("unsupported operation") if platform does not
provide tcdrain(3) (use #if HAVE_TCDRAIN CPP guard to
detect availability).
discardData fd queues calls tcflush to discard
pending input and/or output for Fd fd,
as indicated by the QueueSelector queues.
Constructors
SuspendOutputTCOOFF
RestartOutputTCOON
TransmitStopTCIOFF
TransmitStartTCION
controlFlow fd action calls tcflow to control the
flow of data on Fd fd, as indicated by
action.
Process groups
getTerminalProcessGroupID fd calls tcgetpgrp to
obtain the ProcessGroupID of the foreground process group
associated with the terminal attached to Fd fd.
setTerminalProcessGroupID fd pgid calls tcsetpgrp to
set the ProcessGroupID of the foreground process group
associated with the terminal attached to Fd
fd to pgid.
Testing a file descriptor
queryTerminal fd calls isatty to determine whether or
not Fd fd is associated with a terminal.
getTerminalName fd calls ttyname to obtain a name associated
with the terminal for Fd fd. If fd is associated
with a terminal, getTerminalName returns the name of the
terminal.
getControllingTerminalName calls ctermid to obtain
a name associated with the controlling terminal for the process. If a
controlling terminal exists,
getControllingTerminalName returns the name of the
controlling terminal.
Throws IOError ("unsupported operation") if platform does not
provide ctermid(3) (use #if HAVE_CTERMID CPP guard to
detect availability).
Pseudoterminal operations
openPseudoTerminal creates a pseudoterminal (pty) pair, and
returns the newly created pair as a (master, slave) tuple.
getSlaveTerminalName calls ptsname to obtain the name of the
slave terminal associated with a pseudoterminal pair. The file
descriptor to pass in must be that of the master.