OS(1)                       (hosted)                        OS(1)

     NAME
          os - interface to host OS commands (hosted Inferno only)

     SYNOPSIS
          bind -a '#C' /
          os [ -DrcCbn ] [ -m mountpoint ] [ -d dir ] [ -N level ] cmd
          [ arg... ]

     DESCRIPTION
          Os uses a cmd(3) device to execute a command, cmd, on a host
          system. By default, the current working directory of the
          calling process inside Inferno is used as the cmd working
          directory and $emuroot is prepended to cmd arguments begin-
          ning with the / character.

          If the -m option is given, os uses the device at mountpoint,
          otherwise it is asssumed to be at /cmd, and is bound into
          the local namespace if necessary.

          The -d option causes the command to run in directory dir; an
          error results and the command will not run if dir does not
          exist or is inaccessible. If the -r option is specified,
          $emuroot will not be prepended to the working directory. If
          the -c option is specified, the current working directory
          will not be used for execution. If the -r and -d options are
          not set, then the Inferno root directory will be used as the
          working directory. Note that the -d option overrides the -r
          and -c options. The -C option disables the prepending of
          $emuroot to arguments to cmd beginning with the / character.

          The standard output and standard error of the command appear
          on the standard output and standard error streams of the os
          command itself.  Os copies the standard input to the remote
          command's standard input; redirect os's input to /dev/null
          if there is no input to the command.  Os terminates when cmd
          does, and its exit status reflects the status of cmd (if
          available).

          If the os command is killed or exits (eg, for lack of input
          and output), the host's own process control operations are
          used to (attempt to) kill cmd, if it is still running.  The
          -b (background) option suppresses that behaviour.

          The -n option causes cmd to run with less than normal prior-
          ity (`nice').  The -N option sets low priority to a particu-
          lar level from 1 to 3.

     FILES
          /cmd/clone

     Page 1                       Plan 9             (printed 4/24/24)

     OS(1)                       (hosted)                        OS(1)

     SOURCE
          /appl/cmd/os.b

     SEE ALSO
          cpu(1), rcmd(1), cmd(3)

     DIAGNOSTICS
          The exit status of os reflects any error that occurs when
          starting cmd and, if it starts successfully, the status of
          os is the exit status of cmd.

     Page 2                       Plan 9             (printed 4/24/24)