MDM-RUN(1)

NAME
mdm-run - run a command in parallel with mdm-master

SYNOPSIS
mdm-run command
mdm-sync command

DESCRIPTION
mdm-run annotates command as a candidate for parallel execution. If an mdm-master process is present (i.e., the environment variable MDM_CMD_SOCK is defined), mdm-run submits command to the mdm-master, and it exits when the master issues the command to an mdm-slave process (which may be connected to another terminal) for execution. mdm-sync runs command in place, but it coordinates with mdm-master to ensure that executing command does not interfere with commands that are currently executing in parallel.

If there is no mdm-master process present (i.e., the environment variable MDM_CMD_SOCK is not defined), both mdm-run and mdm-sync simply run command as if you entered command all by itself.

These programs are a part of the Middleman System (mdm).

OPTIONS
Neither mdm-run nor mdm-sync accepts any options.

EXIT STATUS
If there is no mdm-master process present, the exit status of mdm-run is the exit status of command. If an mdm-master process is present, the exit status is 0 if and only if command is successfully issued to an mdm-slave process for execution.

The exit status of mdm-sync is always the exit status of command.

ENVIRONMENT
The mdm system uses the following environment variable for internal communication, and thus you should not try to set them yourself.

MDM_CMD_SOCK
    mdm-run uses this environment variable to decide whether a mdm-master process is present.

EXAMPLE
See mdm.screen(1) for an example use of mdm-run.

SEE ALSO
mdm.screen(1)