![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Kill or modify a process by name or ID (QNX Neutrino)
slay [options]... process_name|process_id ...
Neutrino
![]() |
The -C option was added in the QNX Neutrino Core OS 6.3.2. |
![]() |
The -i option was added in the QNX Neutrino Core OS 6.3.2. |
This command: | Matches a process with: |
---|---|
slay 1234 | ID 1234 or the name 1234 |
slay -m pid 1234 | ID 1234 |
slay -m name 1234 | The name 1234 |
![]() |
The -n option was added in the QNX Neutrino Core OS 6.3.2. |
The priority may be followed by f, r or o to change the scheduling policy to SCHED_FIFO, SCHED_RR or SCHED_OTHER, respectively.
![]() |
SCHED_OTHER is currently the same as SCHED_RR. |
If you specify -P without -T, slay sets the priority of all threads in the specified proccess or processes.
![]() |
The -R option was added in the QNX Neutrino Core OS 6.3.2. |
![]() |
The -T option was added in the QNX Neutrino Core OS 6.3.2. |
Use the slay utility to kill or modify a process by name or by ID. Process names are specified without the path. For example, let's say you have a process called /bin/sleep that you want to kill. Entering sleep as the process name is sufficient to allow slay to find and kill it.
There are many forms of this command. The simplest and most often used form is:
slay process_name|process_id
This command locates the process bearing the specified name or ID. If only one is found, a SIGTERM signal is set on it. If more than one process bears the specified name or ID, you're prompted for a yes/no response for each process. When each process is listed in this form, the process name, pid, and tty group/member numbers are also displayed to help you make a selection.
![]() |
To set a signal on a process you must either own the process or be logged in as root. |
On a multicore system, you can use a runmask to specify which processors a thread or process can run on. The default is all 1s (i.e. all CPUs).
![]() |
The runmask is useful only on multiprocessor systems. |
You can use slay to change the runmask, or the runmask and inherit mask, for threads that are already running; to set the masks for a new process, use the on command. Both commands interpret the -C and -R options in the same way.
You can use more than one -R option to specify a runmask that's more than 32 bits long. The first -R option specifies bits 0 through 31, the second specifies bits 32 through 63, and so on.
If you use both the -C and -R options or multiple instances of them, the resultant mask is the bitwise ORing of all -C and -R options. For example, slay -R 0x1 is equivalent to slay -C0, and slay -R 0x1 -C3 is equivalent to slay -C0 -C3.
When you use -R or -C without -T, all threads in the specified process or processes are affected.
If you use -R or -C, slay always changes the runmask for the specified threads or processes. If you also specify the -i option, slay also sets the inherit mask to the same value as the runmask.
As long as the resulting runmask specifies at least one CPU that is physically present, the runmask will be accepted and any bit indicating CPUs that are not present will be ignored. If the resulting runmask doesn't specify any CPU that are physically present, an error results.
For more information about runmasks, see the Multicore Processing chapter of the System Architecture guide, and the Developing Multicore Systems chapter of the Multicore Processing User's Guide.
Kill the spooler process on node peterv:
slay -n peterv spooler
As root, change priority of the my_test process to 20:
slay -P 20 my_test
The exit status of slay is nonstandard for historical reasons. It is strongly recommended that slay not be used in any situation where the exit status is relied upon because the status is ambiguous in some circumstances.
Multicore Processing chapter of the System Architecture guide, the Multicore Processing User's Guide
![]() |
![]() |
![]() |
![]() |