Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > MIAMEX

MX_GETSIG, CLRSIG

Scroll Prev Top Next More

Reorganized April 2024

xcall MIAMEX, MX_GETSIG, sigmask

xcall MIAMEX, MX_CLRSIG, sigmask

(Unix only)

MX_GETSIG (MIAMEX 54) returns a bitmap indicating which signals have been received since the MX_CLRSIG call was last used to reset the signal received bitmap.

MX_CLRSIG (MIAMEX 55) allows you to clear specific bits in the signal received mask. This would be useful in a situation where you wanted to check whether a certain signal was received during a certain time frame. First you would clear the bit for that signal, then later you would check, using MX_GETSIG, if the bit was set.

Parameters

sigmask (Signed Num)  [in]

CLRSIG: Should be set to the sum of the signals from the table below that you want cleared. Use –1 to clear all of the signal flags. 0 does nothing.

GETSIG: Returns with zero or one of the following bits set to indicate which signal (if any) was received:

Symbol

Value

Name*

Meaning

SR_INT

&h0001

SIGINT

Ctrl+C

SR_CHLD

&h0002

SIGCHLD

Child process terminated

SR_USR1

&h0004

SIGUSR1

Receipt of ITC or IJC message

SR_USR2

&h0008

SIGUSR2

PolyShell swap operation

SR_HUP

&h0010

SIGHUP

Hangup (telnet or terminal session disconnected)

SR_KILL

&h0020

SIGKILL

Kill (cannot be trapped so will never be seen)

SR_TSTP

&h0040

SIGTSTP

Background task waiting for terminal context to perform input operation

SR_ALARM

&h0080

SIGALRM

Alarm signal (used by sleep timers and WAKNOxs)

SR_TERM

&h0100

SIGTERM

Default kill signal

SR_PIPE

&h0200

SIGPIPE

Broken pipe or socket connect (other end has terminated)

SR_SYSCALL

&h4000

Not applicable

Pseudo signal flag used by A-Shell to indicate that it is waiting on a system() call such as HOSTEXxs

Definition file: ashell.def

Hex-Decimal Values

 

* The terms in the "Name" column are the standard POSIX signal names for the subset of signals recognized by A-Shell. Note the standard signal names are associated with integer values that may vary between Unix flavors; the bit values used by A-Shell are independent of the underlying operating system signal values, and uniform across all platforms.

Comments

SUBMIT/W uses these functions. First it clears the SIGCHLD signal flag (2), then submits the task, then sleeps, checking every second to see if the SIGCHLD signal flag has been set, which it will be when the submitted task terminates.