setstate
programsetstate -options command [arg ...]
setstate
changes its process state according to
options
and certain environment variables, and runs the
given command. WARNING: options
must be
a single argument. The leading "-
" is not
required. Options are as follows, and are obeyed in this order:
r
: chdir and chroot to $ROOT
l
: become a process group leader (new in version
2001.06.08)
L
: become a non-process group leader (new in
version 2001.06.08)
s
: become a session leader (new in version
2001.06.08)
f
: set the foreground process group of fd 0 to this
process's group (new in version 2001.06.08)
o
: fchown fd 0 to $UID
(new in version
2001.06.08)
g
: setgid to $GID
G
: setgroups to $GROUPS
, a list of
group IDs with each preceded by a space (including the
first).
u
: setuid to $UID
h
: chdir to $HOME
It is an error if an option is specified and any of the environment variables it uses is not set.