github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/events/onSignalReceived/signal_doc.yaml (about)

     1  - DocumentID: signal
     2    Title: >+
     3      `signal`
     4    CategoryID: commands
     5    Summary: >-
     6      Sends a signal RPC
     7    Description: |-
     8      `signal` sends an operating system RPC (known as "signal") to a specified
     9      process, identified via it's process ID ("pid").
    10  
    11      {{ include "builtins/events/onSignalReceived/signals.inc.md" }}
    12  
    13      ### Listing supported signals
    14  
    15      Signals will differ from one operating system to another. You can retrieve a
    16      JSON map with supported signals by running `signal` without any parameters.
    17    Usage: |-
    18      **Send a signal:**
    19  
    20      1. The first parameter is the process ID (int)
    21      2. The second parameter is the signal name (str). This will be all in
    22         UPPERCASE and prefixed "SIG"
    23  
    24      ```
    25      signal pid SIGNAL
    26      ```
    27  
    28      **List supported signals:**
    29      
    30      ```
    31      signal -> <stdout>
    32      ```
    33  
    34    Examples: |-
    35      **Send a signal:**
    36  
    37      ```
    38      {{ include "behavioural/onSignalReceived.mx" }}
    39      ```
    40  
    41      **List supported signals:**
    42  
    43      ```
    44      ยป signal
    45      {
    46          "SIGABRT": "aborted",
    47          "SIGALRM": "alarm clock",
    48          "SIGBUS": "bus error",
    49          "SIGCHLD": "child exited",
    50          "SIGCONT": "continued",
    51          "SIGFPE": "floating point exception",
    52          "SIGHUP": "hangup",
    53          "SIGILL": "illegal instruction",
    54          "SIGINT": "interrupt",
    55          "SIGIO": "I/O possible",
    56          "SIGKILL": "killed",
    57          "SIGPIPE": "broken pipe",
    58          "SIGPROF": "profiling timer expired",
    59          "SIGPWR": "power failure",
    60          "SIGQUIT": "quit",
    61          "SIGSEGV": "segmentation fault",
    62          "SIGSTKFLT": "stack fault",
    63          "SIGSTOP": "stopped (signal)",
    64          "SIGSYS": "bad system call",
    65          "SIGTRAP": "trace/breakpoint trap",
    66          "SIGTSTP": "stopped",
    67          "SIGTTIN": "stopped (tty input)",
    68          "SIGTTOU": "stopped (tty output)",
    69          "SIGURG": "urgent I/O condition",
    70          "SIGUSR1": "user defined signal 1",
    71          "SIGUSR2": "user defined signal 2",
    72          "SIGVTALRM": "virtual timer expired",
    73          "SIGWINCH": "window changed",
    74          "SIGXCPU": "CPU time limit exceeded",
    75          "SIGXFSZ": "file size limit exceeded"
    76      }
    77      ```
    78    Flags:
    79      SIGINT: >-
    80        **"Signal interrupt"** -- equivalent to pressing `ctrl`+`c`
    81      SIGQUIT: >-
    82        **"Signal quit"** -- requests the process quits and performs a core dump
    83      SIGTERM: >-
    84        **"Signal terminate"** -- request for a processes termination. Similar to `SIGINT`
    85      SIGUSR1: >-
    86        **"Signal user 1"** -- user defined
    87      SIGUSR2: >-
    88        **"Signal user 2"** -- user defined
    89    Detail: |-
    90      {{ include "builtins/events/onSignalReceived/signal_detail.inc.md" }}
    91  
    92      ### Catching incoming signals
    93  
    94      Signals can be caught (often referred to as "trapped") in Murex with an event:
    95      `signalTrap`. Read below for details.
    96    Synonyms:
    97    Related:
    98    - bg
    99    - event
   100    - MUREX_EXE
   101    - out
   102    - onSignalReceived
   103    - terminal-keys
   104    - interactive-shell