nuttx-apps/nshlib
wangjianyu3 8d2a7e32a5 nshlib: Add ppid support for command ps
Add parent process ID support for command ps,
get from "/proc/<PID>/group/status:Parent".

For example

  nsh> sh
  nsh> ps
    PID  PPID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
  ... ...
      3     0     3 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0008136 nsh_main
  ... ...
      9     3     9   0 100 RR       Task      - Running            0000000000000000 0004064 sh

  nsh> sleep 100 &
  sh [10:100]
  nsh> ps
    PID  PPID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
  ... ...
      3     0     3 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0008136 nsh_main
  ... ...
      9     3     9   0 100 RR       Task      - Running            0000000000000000 0004064 sh
     10     9    10 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0004040 sh -c sleep

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-03 22:56:32 +08:00
..
CMakeLists.txt nshlib/dd: remove nsh dd cmd 2025-04-20 00:41:18 +08:00
Kconfig nshlib/dd: remove nsh dd cmd 2025-04-20 00:41:18 +08:00
Make.defs nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile nshlib/dd: remove nsh dd cmd 2025-04-20 00:41:18 +08:00
nsh.h nshlib/dd: remove nsh dd cmd 2025-04-20 00:41:18 +08:00
nsh_alias.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_altconsole.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_builtin.c nshlib/builtin: check background task before restore the signal 2025-02-12 10:30:05 -03:00
nsh_codeccmd.c nshlib/md5: Support reading from standard input 2025-07-02 10:59:40 -03:00
nsh_command.c nshlib/md5: Support reading from standard input 2025-07-02 10:59:40 -03:00
nsh_console.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_console.h apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_consolemain.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_dbgcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_envcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_fileapps.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_fscmds.c nshlib: Remove the unnecessary temp path buffer 2025-01-20 22:39:35 +08:00
nsh_fsutils.c nshlib/nsh_fsutils.c: fix getpid_callback function read size 2025-03-27 09:25:21 +08:00
nsh_init.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_login.c apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_mmcmds.c apps/nshlib: Reuse local variable for cmd_memdump 2025-01-17 23:27:43 +08:00
nsh_mntcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_modcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_netcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_parse.c apps/nshlib: Save result and return ERROR if lib_get_tempbuffer() fails 2025-01-16 22:48:34 +08:00
nsh_passwdcmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_printf.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_proccmds.c nshlib: Add ppid support for command ps 2025-08-03 22:56:32 +08:00
nsh_prompt.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_routecmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_script.c nsh/script: remove double close for output fd 2025-05-14 15:03:35 +08:00
nsh_session.c apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_syscmds.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_system.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_telnetd.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_telnetlogin.c apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
nsh_test.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_timcmds.c nshlib: Replace the big temp buffer with lib_get_[path|temp]buffer 2025-01-20 22:39:35 +08:00
nsh_usbconsole.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_usbtrace.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_vars.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh_wait.c nshlib: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
rc.sysinit.template nsh/script: support rc.sysinit script 2022-04-21 12:54:24 +03:00
rcS.template nsh/script: support rc.sysinit script 2022-04-21 12:54:24 +03:00