kill terminates a process by sending it a signal. The default signal is SIGTERM.
On 7/2008R2/8/2012/10/2016, if you do not have the permissions required to kill a process, you may still be able to terminate it if you have the SeDebug privilege. The kill command automatically enables it if required.
You may specify the following items on the command line:
displays the names of all supported signals. If you specify exit_status, and it is the exit code of a terminated process, kill displays the terminating signal of that process.
terminates a process on the remote system hostname. The remote system must be a 7/2008R2/8/2012/10/2016 system and you must have administrator privileges on that system. To terminate the process, kill installs a service named psproxy on the remote system (if it isn't already installed) and communicates with that service.
This option is only available in the external utility version of kill and not with the MKS KornShell built-in version. You can explicitly specify kill.exe instead of kill to invoke the external utility.
sends the signal signal_name to the process instead of the SIGTERM signal.
is an obsolete equivalent of
is an obsolete method of specifying a positive integer which represents the signal to be used (instead of SIGTERM) as the sig argument in the effective call to kill. The relationship between signal_number and the portable signal_name is shown in Table 1, Integer Values of Signals.
0 0 1 SIGHUP 2 SIGINT 3 SIGQUIT 6 SIGABRT 9 SIGKILL 14 SIGALRM 15 SIGTERM
Table 1: Integer Values of Signals
is the job identifier reported by the shell when a process is started with &. It is one way to identify a process. It is also reported by the jobs command.
is the process ID that the shell reports when a process is started with &. You can also find the pid using the ps command.
The killed process must belong to the current user, unless he or she is the superuser.
When the process being signalled is a NuTCRACKER Platform process, all signals
are delivered using that platform's
When the process being signalled is an MKS Toolkit utility not dependent upon
the NuTCRACKER Platform (that is, those utilities in $ROOTDIR/mksnt) or
a console subsystem application, only the SIGKILL signal
has any effect and results in a call to the Windows
When the process being signalled is a Windows subsystem application (that is, it is not a NuTCRACKER Platform application) or has a message pump, SIGHUP and SIGTERM are mapped to WM_CLOSE and passed to the application.
Because the MKS KornShell is not a NuTCRACKER Platform application, the built-in
trap utility can only handle system generated events
such as CTRL-C. It cannot receive kill signals
from another non-NuTCRACKER Platform application. Using the command
Possible exit status values are:
The specified signal was invalid or there was exactly one job or process that could not be killed.
Failure due to an invalid command line argument or there were exactly two jobs or processes that could not be killed.
Tells the number of jobs or processes that could not be killed.
Possible error messages include:
- "job-identifier" is not a job
You specified a job-identifier that is not valid.
- "signal_name" is not a valid signal
You specified a non-integer signal for kill or a signal that is outside the range of valid signal numbers.
POSIX.2. x/OPEN Portability Guide 4.0. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016. Note that under 7/2008R2/8/2012/10/2016 the only signals supported for arbitrary processes are SIGHUP, SIGTERM, and SIGKILL. kill is provided as both an external utility and a built-in MKS KornShell utility.
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.