NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_kill(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_kill - Send a process a signal

Table Of Contents

Synopsis

Description

The ns_kill command sends a signal to a process identified by its process ID (PID). Although signals are a Unix concept, a minimal form of signal handling is emulated on Windows platforms.

COMMANDS

ns_kill ?-nocomplain? pid signal

Sends the specified signal to the process with the given pid. The signal must be provided as an integer. If the -nocomplain option is used, the command will not return an error if it fails to send the signal.

Common signal values (for Unix-like systems) include:

  • SIGHUP: 1

  • SIGQUIT: 3

  • SIGABORT: 6

  • SIGKILL: 9

  • SIGUSR1: 10

  • SIGUSR2: 12

  • SIGTERM: 15

On Windows, only SIGTERM, SIGABRT, and SIGKILL are supported through an emulation layer. Under Unix-like systems, SIGQUIT, SIGKILL, and SIGABRT generate a core dump and can be used similarly to the ns_crash command. Internally, ns_shutdown uses SIGTERM to request a graceful shutdown of the server.

EXAMPLES

 % ns_kill 46195 10

See Also

ns_crash, ns_job, ns_shutdown

Keywords

global built-in, restart, shutdown, signals