mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
nshlib: add support for pkill command
This command looks through the currently running processes and kills the those that match the selection criteria. This way system can send signal to processes by name and without knowing the IDs. Example (kill application hello): pkill -15 hello The command can be turned off by NSH_DISABLE_PKILL option and depends on FS_PROCFS. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
@@ -310,6 +310,10 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
CMD_MAP("kill", cmd_kill, 2, 3, "[-<signal>] <pid>"),
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PKILL)
|
||||
CMD_MAP("pkill", cmd_pkill, 2, 3, "[-<signal>] <name>"),
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
# if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP)
|
||||
CMD_MAP("losetup", cmd_losetup, 3, 6,
|
||||
|
Reference in New Issue
Block a user