views:

17

answers:

0

I am writing a session saver for GNU Screen. It needs to get every process argument list. Linux has /proc/PID/cmdline which separates arguments with \0. Solaris has pargs. But I am looking for a more crossplatform solution and ps tool seems to be the best bet. "ps -o command" displays argument list but separates arguments only with spaces. Is it possible to force ps to separate command arguments in a different way?