LPC Library Functions: external_start

NAME

external_start() - execute an external command

SYNOPSIS

int external_start(int which, string args, string | function read_cb, string | function write_cb, string | function close_cb | void);

DESCRIPTION

external_start() allows the driver to execute previously specified external commands. To use external start, add a line in the following form to the driver's options file and recompile:

          external_cmd_1: /usr/local/bin/gzip
The 'which' parameter describes which external_cmd_# to run. 'args' is the argument string which will be passed to the command. 'read_cb', 'write_cb', and 'close_cb' are the read, write, and close callback functions which will be executed to communicate or close communications with the program.

external_start() returns a socket which can be used to communicate with the stdin/stdout of the external program.

When external_start() is executed, the master apply valid_socket() is passed "external" as the operation.

Up to 5 commands may be specified in the options file.

This efun is only available if the driver flags PACKAGE_SOCKETS and PACKAGE_EXTERNAL are defined.

Page design by Frank Jacquette & Tim Hollebeek
Copyright (C) 1998 Tim Hollebeek & Frank Jacquette
Back to MudOS