the pidof command in linux doesn't seem to work in lx branded zones.
this command is used by things like the Red Hat up2date tool and init.d
scripts. here's an example of the failure:
---8<---
edp@secrassic$ /etc/init.d/sshd status
pidof: can't read sid for pid 4276
pidof: can't read sid for pid 4277
sshd (pid 25683) is running...
---8<---
so the pids that pidof is complaining about are native processes in the
zone. specifically these are the pids of the statd and lockd daemons.
the problem is that pidof calls emulation code that tries to translate
the linux pid into a solaris pid via a call to lx_lpid_to_spair().
this fails for these pids since they are native processes and never
had their pids entered into the linux-to-solaris pid hash table (ltos_pid_hash)
the solution it to make lx_lpid_to_spair() smarter. after it looks in the
hash table, if it doesn't find anything it should check if the supplied
pid is running in the current zone. if it is then it's a native process and
the pid should just be returned as is (without any translations.)