XU XUv0.16.0

#os/signal

import: #os/signal

counts: 5 functions, 2 methods, 1 types, 8 constants, 0 method sets

Unix signal numbers. notify is not hooked to the kernel and throws so signals are not silently dropped.

const SIGHUP

XuAPI
pub const SIGHUP = 1

Purpose

Constant SIGHUP, defining protocol or algorithm parameters.

const INTERRUPT

XuAPI
pub const INTERRUPT = 2

Purpose

Constant INTERRUPT, defining protocol or algorithm parameters.

const SIGINT

XuAPI
pub const SIGINT = 2

Purpose

Constant SIGINT, defining protocol or algorithm parameters.

const SIGQUIT

XuAPI
pub const SIGQUIT = 3

Purpose

Constant SIGQUIT, defining protocol or algorithm parameters.

const KILL

XuAPI
pub const KILL = 9

Purpose

Constant KILL, defining protocol or algorithm parameters.

const SIGKILL

XuAPI
pub const SIGKILL = 9

Purpose

Constant SIGKILL, defining protocol or algorithm parameters.

const SIGPIPE

XuAPI
pub const SIGPIPE = 13

Purpose

Constant SIGPIPE, defining protocol or algorithm parameters.

const SIGTERM

XuAPI
pub const SIGTERM = 15

Purpose

Constant SIGTERM, defining protocol or algorithm parameters.

struct Notifier

XuAPI
pub struct Notifier {
    pub ch chan int
    pub sig int
    pub active bool
}

Purpose

Structure encapsulating ch, sig, active.

Public fields

ch chan int
character code
sig int
field (int)
active bool
field (bool)

new_notifier

XuAPI
pub fn new_notifier(c chan int, sig int) Notifier

Purpose

Construct notifier.

Parameters

c chan int
byte or character code (channel; type chan int)
sig int
sig (int)

Returns

Notifier — a value of this type

($&Notifier) stop

XuAPI
pub fn (n $&Notifier) stop()

Purpose

Execute stop on $&Notifier.

Parameters

n $&Notifier
The Notifier instance used by this call (exclusive borrow).

Returns

This call does not return a value.

(&Notifier) raise

XuAPI
pub fn (n &Notifier) raise(sig int) bool

Purpose

Execute raise on &Notifier.

Parameters

n &Notifier
The Notifier instance used by this call (borrow).
sig int
sig (int)

Returns

bool — true or false

notify

XuAPI
pub fn notify(c chan int, sig int) int

Purpose

Execute notify. Throws on failure; handle the error or propagate it to the caller.

Parameters

c chan int
byte or character code (channel; type chan int)
sig int
sig (int)

Returns

int — a value of this type

stop

XuAPI
pub fn stop(c chan int) int

Purpose

Execute stop.

Parameters

c chan int
byte or character code (channel; type chan int)

Returns

int — a value of this type

ignore

XuAPI
pub fn ignore(sig int) int

Purpose

Execute ignore. Throws on failure; handle the error or propagate it to the caller.

Parameters

sig int
sig (int)

Returns

int — a value of this type

raise

XuAPI
pub fn raise(c chan int, sig int) bool

Purpose

Execute raise.

Parameters

c chan int
byte or character code (channel; type chan int)
sig int
sig (int)

Returns

bool — true or false