Skip to content

Commit 45aa8fe

Browse files
committed
ps.sh: fix ps arguments to work for busybox
Use the format specifier 'ppid,args' instead of 'ppid command'. POSIX allows either spaces or commas as separators, but busybox only allows commas. Furthermore, 'args' is recognized by POSIX[0] while 'command' is not. On implementations of ps that do recognize 'command', it is simply an alias for 'args', e.g. Debian[1] and FreeBSD[2]. [0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html [1]: https://manpages.debian.org/bullseye/procps/ps.1.en.html [2]: https://www.freebsd.org/cgi/man.cgi?query=ps
1 parent 75458f9 commit 45aa8fe

File tree

1 file changed

+1
-1
lines changed
  • save_command_strategies

1 file changed

+1
-1
lines changed

save_command_strategies/ps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exit_safely_if_empty_ppid() {
1111
}
1212

1313
full_command() {
14-
ps -ao "ppid command" |
14+
ps -ao "ppid,args" |
1515
sed "s/^ *//" |
1616
grep "^${PANE_PID}" |
1717
cut -d' ' -f2-

0 commit comments

Comments
 (0)