builtin
kill -0
Check existence and permission without delivering a signal; this is not durable identity or ownership evidence.
Formal Syntax & Structure
bash syntaxbash
kill -0 pidParameters & Attributes
| Name | Type | Description |
|---|---|---|
| pid | positive PID | Known process identifier. |
Return Value
exit status
Check existence and permission without delivering a signal; this is not durable identity or ownership evidence.
Working Example
Example Snippetbash
if kill -0 "$BASHPID"; then printf 'self exists\n'fi