<kill $pid [$sig]>
To each process id in
kill function sends
the signal in the corresponding value of
$sig. If fewer values
$sig are present than
$pid, the last is re-used; if
none are given,
SIGTERM (15) is used. Signals may be given as
numbers or names (e.g. "
SIGHUP" and 1 are generally
It is generally advisable to use the default or
signal first when killing a process, so that it has a chance to clean
up and potentially avoid corruption issues. Only after
fails and several seconds have passed should a hard
kill function returns 1 if the call succeeds, 0 if not.
In version 3.01.983500000 20010301 and earlier, nothing is returned.
kill function was added in version 2.1.900900000 19980720.
For Windows, version 5.01.1171938352 20070219 and later map signal 0
SIGBREAK to a Ctrl-Break
SIGTERM to a Texis Terminate event (soft kill, works
with most Texis processes only). All other signals are mapped to
TerminateProcess, which is a "hard" kill of a process and
should only be used as a last resort. Prior to Windows version
5.01.1171938352 20070219, all signals mapped to
TerminateProcess. Prior to Windows version 3.01.983500000
kill function had no effect. Use
procexists function instead of
<kill $pid 0> to test
for the existence of a process.