Home Contents | # os.kill | OS | Core4 Lua Commands

## SYNOPSIS

#include <lua/signal.lh>
os.kill(pid [, signal])

## DESCRIPTION

Sends a signal to a process with the id pid.

By default, the signal SIGTERM is sent, which terminates the target process.

The other signal numbers make not much sense for Lua programs, so they are not listed here.

## RETURN VALUE

On success, returns true. On error, three values are returned: nil, a string describing the error (The result of the C library call strerror() on the errno code) and the errno number from the standard C library.

## SEE ALSO

os.spawn(), event:spawn()