# kill command

The kill UNIX BASIC program sends a UNIX signal to a D3 or UNIX
 process. Signals can be specified by their names, rather than by their number, and D3 processes by
 their port numbers instead of the UNIX PIDs.

**For Windows:**Not Supported

## Syntax

```
kill {-[signo|signame]} [pid|ppib] {[pid|ppib]...}
```

## Parameter(s)

| signo | Optional signal number in decimal. If not specified, SIGTERM is sent. |
| --- | --- |
| signame | Optional signal name. Among the valid signal lists are: {SIG}TERM, {SIG}HUP, and {SIG}USR2. If not specified, SIGTERM is sent. |
| ppib | Indicates the D3 PIB (port number), prefixed by the letter p. |
| | Checks that none of the specified processes have a PID of 0, which would kill all processes in the group, usually resulting in an abrupt shutdown of the D3 virtual machine. |

 Warning:
 Killing the flush process logs off D3 processes immediately and shuts down the entire virtual
 machine. Killing the flusher can be accomplished by using the form
 `P`** with a PIB number equal to -2:

```
kill p-2
```

 This should not be the normal way to shut down a virtual machine, because it loses overflow.
 It can be used only to do an emergency shutdown, due to an imminent power failure, for
 instance.

## Example(s)

Kills the (UNIX) process associated with port 17.

```
kill p17
```

 Sends a signal, `sigalrm`, to the UNIX process associated with port 33 and to
 the UNIX process whose PID is 7143.

```
kill -sigalrm p33 7143
```

 Sends a `signup` to port 0.

```
kill -1 p0
```

## See also

- [%kill() function](https://d3codex.com/pickbasic-flashbasic/percent-kill-function/)
- [d3 command](https://d3codex.com/unix/d3-command/)
- [PID](https://d3codex.com/definitions/pid/)
- [pid command](https://d3codex.com/tcl/pid-command/)
- [Port number](https://d3codex.com/definitions/port-number/)
- [psr command](https://d3codex.com/tcl/psr-command/)

---
Source: https://d3codex.com/tcl/kill-command/ - part of the D3Codex reference.
