exec-object — Creates executable objects for use under Plash


exec-object executable-pathname root-directory
def var =
    capcmd exec-object /bin/foo
      /x=(mkfs /bin/foo /usr ...)


This is a command that is only useful when called using a capcmd expression from Plash.

This command returns an executable object E. When E is invoked with a root directory dir2 as an argument, it forks a new process whose root directory is set to be a union of root-directory and dir2, and that new process execve()s executable-pathname.

This is commonly used with the shell's mkfs expression, which will construct the root directory.

Return value

The return value given by exit() isn't used. This program returns an object reference using the return_cont mechanism. It doesn't exit until all the references to the object have been dropped.


  def my_oggenc =
    capcmd exec-object '/usr/bin/oggenc'
      /x=(mkfs /usr/bin/oggenc /usr/lib /lib)

  def my_oggenc =
    capcmd exec-object '/usr/bin/oggenc'
            /usr/bin/oggenc=(F /debian/usr/bin/oggenc)
            /usr/lib=(F /debian/usr/lib)
            /lib=(F /debian/lib))

  def my_oggenc =
    capcmd exec-object '/usr/bin/oggenc'

See also




Mark Seaborn <>