PSETZONEID(3PROC) Process Control Library Functions PSETZONEID(3PROC) NNAAMMEE PPsseettzzoonneeiidd - change processes zone id LLIIBBRRAARRYY Process Control Library (libproc, -lproc) SSYYNNOOPPSSIISS ##iinncclluuddee <> _i_n_t PPsseettzzoonneeiidd(_s_t_r_u_c_t _p_s___p_r_o_c_h_a_n_d_l_e _*_P, _z_o_n_e_i_d___t _z_o_n_e_i_d); DDEESSCCRRIIPPTTIIOONN The PPsseettzzoonneeiidd() function moves the process handle _P into the zone specified by _z_o_n_e_i_d. A process that is in the non-global zone may only move between the global zone and its original zone. A process that is in the global zone may not use this interface to enter a non-global zone. This function will fail if called from a non-global zone. This function only manipulates the processes credentials. Care should be taken when moving a process around temporarily, such that if the process that is manipulating _P dies, it does not cause _P to resume running while still in the global zone. It is suggested that the PPRR__KKLLCC flag is set with Psetflags(3PROC) which will cause the process to terminate if the process that holds _P unexpectedly terminates. See proc(4) for more information on the PPRR__KKLLCC flag. Note, only active processes may change their zone. It is an error to call this function on process handles that correspond to core files, zombie processes, or files. RREETTUURRNN VVAALLUUEESS Upon successful completion, the PPsseettzzoonneeiidd() function returns 00 and changes the zone for _P. Otherwise, --11 is returned and eerrrrnnoo is set. EERRRROORRSS For a full list of possible errors see the DDIIAAGGNNOOSSTTIICCSS section in proc(4). The PPsseettzzoonneeiidd() function will fail if: EINVAL _z_o_n_e_i_d does not correspond to an existing zone or the zone id is not the global zone or the original zone of _P. EPERM The caller does not hold the required privileges for zone configuration. IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY UUnnccoommmmiitttteedd MMTT--LLEEVVEELL See LLOOCCKKIINNGG in libproc(3LIB). SSEEEE AALLSSOO libproc(3LIB), proc(4), privileges(5), zones(5) illumos May 11, 2016 illumos