3 Commits

Author SHA1 Message Date
Alin Jerpelea
27d8ae36ba nshlib: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-30 18:02:50 +08:00
wangjianyu3
687c1cacd9 nshlib/cmd_wait: Wait failed if "PROCFS/PROCES" not enabled
Env

  sim:nsh
  - CONFIG_FS_PROCFS_EXCLUDE_PROCES=y

Error

  nsh> sleep 5 &
  sh [4:100]
  nsh> wait 4
  nsh: wait: wait failed: 2

cmd_wait():

  snprintf(path, sizeof(path), "/proc/%d/status", tid);

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-14 23:20:39 +08:00
anjiahao
c916f163f2 nsh:support wait command to wait task exit.
usage like:
  nsh> sleep 10 &
  [5:100]
  nsh>set pid1=$!
  nsh>sleep 15 &
  [6:100]
  nsh>set pid2=$!
  nsh>wait $pid1 $pid2

'wait' command will block nsh from running until pid1 and pid2 finish.
This is useful for parallel requirements to perform certain tasks

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-02 21:13:54 +08:00