In Solaris the global zone and the non-global zone have separate init processes.

root@testbed:~# ps -efZ | egrep "init|zsched"
  global     root     1     0   0 14:13:50 ?           0:00 /usr/sbin/init
  myzone     root  1429     1   0 14:14:50 ?           0:00 zsched
  myzone     root  1505  1429   0 14:14:57 ?           0:00 /usr/sbin/init

Before SRU 66 an orphaned process was reparented to process 1 and thus to the global zone init. This has changed in SRU 66: An orphaned process of a non-global zone is reparented to the init process of the non-global zone instead.

This has one important implication: The process id of this init process in the zone isn’t 1, but something different and thus the parent process of an orphaned process in a zone is no longer 1 but in my example 1505.

However, some applications determine if they are orphaned by checking if their parent process has a PID of 1. As the parent of an orphaned processes in a zone isn’t 1 any longer, this mechanism obviously doesn’t work since SRU66 in a NGZ.

In order to allow such applications to work properly, in SRU 81 zshed and init have a virtual PID inside the zone.

On SRU 80 a ps would output the real PID when executed inside of the non-global zone:

root@myzone:~# ps -ef | egrep "init|zsched"
    root  1429  1429   0 12:14:50 ?           0:00 zsched
    root  1505  1429   0 12:14:57 ?           0:00 /usr/sbin/init

In SRU 81 the output is different. Inside of the zone zshed has now the virtual PID 0 and init has the virtual PID 1. Let´s check this with ps:

root@myzone:~# ps -ef | egrep "init|zsched"
    root     0     0   0 04:51:35 ?           0:00 zsched
    root     1     0   0 04:51:41 ?           0:00 /usr/sbin/init

There are no changes from the outside perspective of the global zone. From the outside the real PID is still visible:

jmoekamp@testbed:~$ ps -efZ | egrep "init|zsched"
  global     root     1     0   0 06:50:19 ?           0:00 /usr/sbin/init
  myzone     root  1391     1   0 06:51:35 ?           0:00 zsched
  myzone     root  1455  1391   0 06:51:41 ?           0:00 /usr/sbin/init
Written by

Joerg Moellenkamp

Grey-haired, sometimes grey-bearded Windows dismissing Unix guy.