Open rra opened 3 years ago
Does someone know if setproctitle() works with ps on Solaris 10 & 11?
Using /usr/ucb/ps -auxww
on Solaris 10 and Solaris 11 shows the problem is still present:
$ /usr/ucb/ps -auxwww | grep nnrpd
iulius 12698 0.0 0.0 8240 1664 ? S 11:39:24 0:00 - nnrpd: acceptin acceptin ceptin tin
iulius 12717 0.0 0.0 8376 1944 ? S 11:40:09 0:00 - nnrpd: localhos localhos calhos hos
And native ps auxww
does not show the updated process title:
$ ps auxww | grep nnrpd
iulius 12790 0.0 0.0 8264 1024 ? S 12:00:24 0:00 ./nnrpd -D -p 11119
Solaris 11.4 is currently announced to be supported by Oracle until 2034, so I keep this ticket open, and update its title.
Fixing that issue on Solaris will permit getting rid of the -s flag hack for nnrpd. Let's schedule it for the next major release.
Reported by eagle on 14 Dec 2008 07:43 UTC Reported by Miroslaw Luc mirecki@nask.pl.
ps reads all of the strings from argv, not just
argv[0]
, to the nearest NULL. Settingargv[1]
to NULL helps ps to read onlyargv[0]
.If the length of the initial
args > argv[0]
modified bysetproctitle()
then ps discards the latter and displays the initial args. The problem is that it is always true because of using SPACES in ovdb_monitor/ovdb_server and `-s' in nnrpd.We should:
argv[1]
to NULL in setproctitle().argv[0]
.It's not clear if this is worth it; setproctitle() seems to be getting less and less popular.