Skip to content

example(Sys.ps) fails on Alpine Linux #9

Description

@bastistician

On Alpine Linux, /bin/ps -> /bin/busybox provides fewer options than other implementations:

Usage: ps [-o COL1,COL2=HEADER] [-T]

Show list of processes

	-o COL1,COL2=HEADER	Select columns for display
	-T			Show threads

Thus, example(Sys.ps) fails for me:

> (.pid <- Sys.getpid()) ## process ID of current process
[1] 22939
> Sys.sizes(.pid)
/bin/ps: unrecognized option: p
Error in Sys.ps(process, c("rss", "vsz")) : 
  call returned less than two lines:
In addition: Warning message:
In system(cmd, intern = !usefile) :
  running command '/bin/ps w -p 22939 -o rss,vsz ' had status 1

Considering that there is already another report where this non-portable function fails its example (#7), the simplest "solution" (pacifying checks) would be to wrap the Sys.sizes() example in try(). (PS: also in robustbase/tests/MT-tst.R.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions