OS(1)OS(1)

NAME

os – interface to host OS commands (drawterm only)

SYNOPSIS

os [ -b ] [ -m mountpoint ] [ -d dir ] [ -n ] [ -N level ] cmd [ arg... ]

DESCRIPTION

Os uses a cmd(3) device to execute a command, cmd, on a host system. If the -m option is given, os uses the device at mountpoint, otherwise it is assumed to be at /mnt/term/cmd.

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. 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 priority (‘nice’). The -N option sets low priority to a particular level from 1 to 3.

FILES

/mnt/term/cmd/clone

SOURCE

/sys/src/cmd/os.c

SEE ALSO

rcpu(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.