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 pid

Parameters & Attributes

NameTypeDescription
pidpositive PIDKnown 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
Bash Reference