s---signal Verified current stable Not installed? System Operations

S Signal / Send Signal On Timeout

Send Signal On Timeout

Sends a signal to a command upon timeout.

$
Terminal
timeout -s <INT|HUP|KILL|...> <5s> <sleep 10>

When To Use

During automation scripts needing precise control over processes in timed intervals

Pro Tip

Spectacularly useful with complex commands; avoid race conditions by testing signal handling behavior.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
timeout -s <INT|HUP|KILL|...> <5s> <sleep 10>

Anatomy of Output

Understanding the result

Sending signal KILL to process 1234 after 5 seconds Signal Info

Confirms the action taken on timeout.

Process terminated as expected; exit code 9 Exit Code

Indicates successful termination of command.

No additional actions required Completion Note

Final status on process handling.

Power User Variants

Optimized versions

s---signal TERM 10s sleep 10

Send SIGTERM instead of default on timeout.

s---signal HUP 15s my_command

Send SIGHUP on timeout for resource cleanup.

Troubleshooting

Common pitfalls

timeout: unknown signal 'INVALID_SIGNAL'

Solution: Verify the signal name against valid options and retry.

timeout: command failed to execute

Solution: Check command syntax and execution environment.

timeout: failed to send signal to process

Solution: Ensure the target process is active before issuing the command.

Command Breakdown

What each part is doing

timeout
Base Command
The executable that performs this operation. Here it runs S Signal before the shell applies any redirect operators.
-s
s| signal
The value supplied for s| signal.
<INT|HUP|KILL|...>
INT|HUP|KILL|...
The value supplied for INT|HUP|KILL|....
<5s>
5s
The value supplied for 5s.
<sleep 10>
sleep 10
The value supplied for sleep 10.
-s
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative system operations tools for the same job.