You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Setting argv[1] to NULL helps ps to read only argv[0].
If the length of the initial args > argv[0] modified by setproctitle() 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:
Set argv[1] to NULL in setproctitle().
Move the environment to malloc()'ed space to make a room for argv[0].
Spawn nnrpd without `-s'.
Remove SPACES from ovdb_init,monitor,server.
It's not clear if this is worth it; setproctitle() seems to be getting less and less popular.
The text was updated successfully, but these errors were encountered:
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.
Julien-Elie
changed the title
setproctitle doesn't work with /usr/ucb/ps on Solaris 8 & 9
setproctitle doesn't work with /usr/ucb/ps on Solaris
Apr 15, 2023
Julien-Elie
changed the title
setproctitle doesn't work with /usr/ucb/ps on Solaris
Remove the need for the "nnrpd -s" hack: improve setproctitle() and fix /usr/ucb/ps on Solaris
Apr 15, 2023
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.
The text was updated successfully, but these errors were encountered: