Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nshlib/cmd_wait: Wait failed if FS_PROCFS not enabled #2848

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nshlib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion nshlib/nsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion nshlib/nsh_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ static const struct cmdmap_s g_cmdmap[] =
CMD_MAP("xd", cmd_xd, 3, 3, "<hex-address> <byte-count>"),
#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
Expand Down
3 changes: 2 additions & 1 deletion nshlib/nsh_wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:";

Expand Down
Loading