Opened 11 years ago

#39 new defect

setproctitle doesn't work with /usr/ucb/ps on Solaris 8 & 9

Reported by: eagle Owned by: eagle
Priority: low Milestone:
Component: lib Version:
Severity: minor Keywords:
Cc:

Description

Reported by Miroslaw Luc <mirecki@…>.

  1. 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];)
  1. 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:

  1. Set argv[1] to NULL in setproctitle().
  2. Move the environment to malloc()'ed space to make a room for argv[0].
  3. Spawn nnrpd without `-s'.
  4. 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.

Attachments (1)

setproctitle-solaris.patch (6.3 KB) - added by eagle 11 years ago.
Patch against STABLE 20051208

Download all attachments as: .zip

Change History (1)

Changed 11 years ago by eagle

Attachment: setproctitle-solaris.patch added

Patch against STABLE 20051208

Note: See TracTickets for help on using tickets.