diff --git a/nshlib/Kconfig b/nshlib/Kconfig index be6ac1b55b..388099ef0a 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -715,6 +715,7 @@ config NSH_DISABLE_WAIT bool "Disable wait" default DEFAULT_SMALL depends on SCHED_WAITPID + depends on FS_PROCFS && !FS_PROCFS_EXCLUDE_PROCESS config NSH_DISABLE_WATCH bool "Disable watch" diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 20d8f82fae..75c84f856e 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -1238,7 +1238,8 @@ int cmd_watch(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv); #endif #if !defined(CONFIG_NSH_DISABLE_WAIT) && defined(CONFIG_SCHED_WAITPID) && \ - !defined(CONFIG_DISABLE_PTHREAD) + !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_FS_PROCFS) && \ + !defined(CONFIG_FS_PROCFS_EXCLUDE_PROCESS) int cmd_wait(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv); #endif diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index 9358d0a9ce..c31a89b86e 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -679,7 +679,8 @@ static const struct cmdmap_s g_cmdmap[] = CMD_MAP("xd", cmd_xd, 3, 3, " "), #endif #if !defined(CONFIG_NSH_DISABLE_WAIT) && defined(CONFIG_SCHED_WAITPID) && \ - !defined(CONFIG_DISABLE_PTHREAD) + !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_FS_PROCFS) && \ + !defined(CONFIG_FS_PROCFS_EXCLUDE_PROCESS) CMD_MAP("wait", cmd_wait, 1, CONFIG_NSH_MAXARGUMENTS, "pid1 [pid2 [pid3] ...]"), #endif diff --git a/nshlib/nsh_wait.c b/nshlib/nsh_wait.c index c025799ad2..08106736b2 100644 --- a/nshlib/nsh_wait.c +++ b/nshlib/nsh_wait.c @@ -35,7 +35,8 @@ #include "nsh_console.h" #if !defined(CONFIG_NSH_DISABLE_WAIT) && defined(CONFIG_SCHED_WAITPID) && \ - !defined(CONFIG_DISABLE_PTHREAD) + !defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_FS_PROCFS) && \ + !defined(CONFIG_FS_PROCFS_EXCLUDE_PROCESS) static const char g_groupid[] = "Group:";