Home

SIGUSR1

SIGUSR1 is a POSIX signal designated as user-defined signal 1. It is one of two signals reserved for application-defined use (the other being SIGUSR2). The system does not assign a fixed meaning to SIGUSR1; the receiving process determines its interpretation. Signals are delivered asynchronously, allowing a process to be notified of events without exchanging data.

On most Unix-like systems, the default action for SIGUSR1 is to terminate the process, with no automatic

In practice, SIGUSR1 is used to implement custom notifications that are meaningful to the application, such

Notes: exact signal numbers and some delivery semantics are platform-dependent. Programs intended to be portable should

core
dump.
This
default
can
be
changed
by
installing
a
signal
handler.
The
signal
can
be
sent
with
commands
such
as
kill
or
raise,
and,
in
some
implementations,
sigqueue
can
deliver
data
alongside
the
signal.
In
multi-threaded
programs,
signals
are
delivered
to
one
thread
according
to
specific
rules,
and
handlers
are
typically
installed
with
sigaction
rather
than
the
older
signal
interface
to
ensure
portability
and
reliable
behavior.
as
triggering
a
configuration
reload,
rotating
logs,
toggling
verbose
output,
or
signaling
to
dump
internal
state.
Because
signal
handlers
must
be
async-signal-safe,
developers
usually
set
a
small,
atomic
flag
in
the
handler
and
perform
the
actual
work
in
the
main
loop,
or
use
inter-thread
communication
mechanisms
(like
a
pipe
or
signalfd)
to
handle
the
event
safely.
avoid
relying
on
a
particular
interpretation
of
SIGUSR1
beyond
its
role
as
a
user-defined
signal,
and
should
document
the
intended
meaning
within
the
application.