casaroli opened a new pull request, #3925: URL: https://github.com/apache/nuttx-apps/pull/3925
## Summary For a file application in the background (`prog &`), `nsh_fileapp()` printed `prog [pid:priority]` with `ret` as the PID. `ret` is 0 after `posix_spawnp()` succeeds, so NSH printed `[0:...]` and the priority of NSH itself (`sched_getparam(0, ...)`). This PR uses the PID that `posix_spawnp()` returns. `nsh_builtin.c` already prints the correct PID for a builtin application. ## Impact Only the line that NSH prints for a background file application. `$!` was already correct. ## Testing qemu-armv8a:knsh under QEMU with HVF, NSH from this branch, a test program `bgpid` that prints its own PID, run as `bgpid &`: | | master | this PR | |---|---|---| | NSH prints | `bgpid [0:100]` | `bgpid [5:100]` | | the program prints | `bgpid: pid=5` | `bgpid: pid=5` | ostest exits with status 0 on qemu-armv8a:knsh and qemu-armv8a:nsh (NSH from this branch). Build with NuttX master, each OK: qemu-armv8a:nsh (flat, arm64), qemu-armv8a:knsh (kernel, arm64), rv-virt:nsh64 (flat, rv64), rv-virt:pnsh64 (protected, rv64). `tools/checkpatch.sh -c -u -m -g` passes. No documentation change: `Documentation/applications/nsh/commands.rst` already shows the PID in this line. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
