Name

exec-object — Creates executable objects for use under Plash

Synopsis

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

Description

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.

Examples

  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'
      /x=(mkfs
            /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'
      /x=(mkfs
            /usr/bin/oggenc
            /usr/lib/libvorbisenc.so.0
            /usr/lib/libvorbis.so.0
            /lib/i686/libm.so.6
            /usr/lib/libogg.so.0
            /usr/lib/plash/lib/libc.so.6)

See also

plash(1)

/usr/share/doc/plash

Author

Mark Seaborn <mseaborn@onetel.com>