pysigfd package

Submodules

pysigfd.pysigfd module

pysigfd.py

class pysigfd.pysigfd.SigSet(signals=None)[source]

Bases: object

This is a thin wrapper over sigsetops(3)

add(sig)[source]

Add the specified signal to the signal set

empty()[source]

Initialize the signal set to empty

fill()[source]

Initialize the signal set to full, including all signals

get_set()[source]
get_sigs()[source]
ismember(sig)[source]

Test if the specified signal is a member of the signal set

remove(sig)[source]

Remove the specified signal from the signal set

pysigfd.pysigfd.init()[source]
class pysigfd.pysigfd.sigfd(signals, flags=None)[source]

Bases: object

signalfd(signal_set, [flags]) -> signalfd object Create a signalfd object for receiving the set of signals specified as a sigset object.

close()[source]

Close the signalfd object. It cannot be used after this call.

fileno()[source]

Return the integer file descriptor returned by signalfd(2).

info()[source]

Return the next signalfd_siginfo structure available from the signalfd file descriptor. The signalfd_siginfo structure has the following attributes:

For example:

info = sigfd.info()
print "Received signal: %d" % info.ssi_signo
pysigfd.pysigfd.sigprocmask(signals, mode=2)[source]

Examine and change blocked signals - signals is a sigset object. - mode controls how sigprocmask() interprets the signal mask (see below)

pysigfd.static module

version which can be consumed from within the module

Module contents

Initialize the module