The Standard ML Basis Library


The Posix.Signal structure


Synopsis

signature POSIX_SIGNAL
structure Signal : POSIX_SIGNAL

The structure Posix.Signal defines the symbolic names of all the POSIX signals (see Section 3.3 of the POSIX standard 1003.1,1996[CITE]), and provides conversion functions between them and their underlying representations.


Interface

eqtype signal

val toWord   : signal -> SysWord.word
val fromWord : SysWord.word -> signal

val abrt : signal
val alrm : signal
val bus  : signal
val fpe  : signal
val hup  : signal
val ill  : signal
val int  : signal
val kill : signal
val pipe : signal
val quit : signal
val segv : signal
val term : signal
val usr1 : signal
val usr2 : signal
val chld : signal
val cont : signal
val stop : signal
val tstp : signal
val ttin : signal
val ttou : signal

Description

eqtype signal
A POSIX signal, an asynchronous notification of an event.

val toWord : signal -> SysWord.word
val fromWord : SysWord.word -> signal
These convert between a signal identifier and its underlying integer representation. Note that fromWord does not check that the result corresponds to a valid POSIX signal.

See Also

Posix, Posix.Process

Discussion

The values defined in this structure represent the standard POSIX signals. The following table provides a brief description of their meanings.


SML name Description
abrt End process (abort).
alrm Alarm clock.
bus Bus error.
fpe Floating-point exception.
hup Hangup.
ill Illegal instruction.
int Interrupt.
kill Kill. (It cannot be caught or ignored.)
pipe Write on a pipe when there is no process to read it.
quit Quit.
segv Segmentation violation.
term Software termination signal.
usr1 User-defined signal 1.
usr2 User-defined signal 2.
chld Sent to parent on child stop or exit.
cont Continue if stopped. (It cannot be caught or ignored.)
stop Stop. (It cannot be caught or ignored.)
tstp Interactive stop.
ttin Background read attempted from control terminal.
ttou Background write attempted from control terminal.

The name of the corresponding POSIX signal can be derived by capitalizing all letters and adding the string ``SIG'' as a prefix. For example, the POSIX signal associated with usr2 is SIGUSR2.
[ Top | Parent | Contents | Index | Root ]

Generated October 02, 2003
Last Modified May 3, 2003
Comments to John Reppy.


This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.

Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.

Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order, please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).