mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 15:32:21 +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:
@@ -1181,6 +1181,9 @@ int cmd_switchboot(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
|
||||
#ifndef CONFIG_NSH_DISABLE_KILL
|
||||
int cmd_kill(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
|
||||
#endif
|
||||
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PKILL)
|
||||
int cmd_pkill(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
|
||||
#endif
|
||||
#ifndef CONFIG_NSH_DISABLE_SLEEP
|
||||
int cmd_sleep(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user