Description: Documentation

## function get_process_input

### Synopsis

get_process_input

### Usage

Void get_process_input (Int_Type tsecs);

### Description

Read all pending input by all subprocesses. If no input is available, this function will wait for input until tsecs tenth of seconds have expired.

## function kill_process

### Synopsis

kill_process

### Usage

Void kill_process (Int_Type id);

### Description

Kill the subprocess specified by the process handle id .

## function open_process

### Synopsis

open_process

### Usage

Int_Type open_process (name, argv1, argv2, ..., argvN, N);

### Description

Returns id of process, -1 upon failure.

## function process_mark

### Synopsis

process_mark

### Usage

User_Mark process_mark (Int_Type id);

### Description

This function returns the user mark that contains the position of the last output by the process.

## function process_query_at_exit

### Synopsis

Whether or not to silently kill a process at exit

### Usage

Void process_query_at_exit (Int_Type pid, Int_Type query)

### Description

The process_query_at_exit may be used to specify whether or not the process specified by pid should be silently ignored when the editor exits. If the parameter query is non-zero, the user will be reminded the process exists before exiting.

### See also

open_process , kill_process , exit_jed

## function run_shell_cmd

### Synopsis

run_shell_cmd

### Usage

Void run_shell_cmd (String cmd);

### Description

The run_shell_cmd function may be used to run cmd in a separate process. Any output generated by the process is inserted into the buffer at the current point. It generates a S-Lang error if the process specified by cmd could not be opened. Otherwise, it returns the exit status of the process.

## function send_process

### Synopsis

send_process

### Usage

Void send_process (Int_Type id, String s);

### Description

Undocumented

## function send_process_eof

### Synopsis

send_process_eof

### Usage

send_process_eof (Int_Type pid);

### Description

This function closes the stdin of the process specified by the handle pid .

## function set_process

### Synopsis

set_process

### Usage

Void set_process (Int_Type pid, String what, String value);

### Description

pid is the process handle returned by open_process . The second parameter, what , specifies what to set. It must be one of the strings:

            "signal" :  indicates that 'value' is the name of a function to call
                        when the process status changed.  The function specified
                        by 'value' must be declared to accept an argument list:
                        (pid, flags, status) where 'pid' has the same
                        meaning as above and flags is an integer with the
                        meanings:
                          1: Process Running
                          2: Process Stopped
                          4: Process Exited Normally
                          8: Process Exited via Signal
                        The meaning of the \var{status} parameter depends
                        upon the \var{flags} parameter.  If the process
                        exited normally, then \var{status} indicates its
                        return status.  Otherwise \var{status} represents
                        the signal that either stopped or killed the
                        process.
                        Note: when this function is called, the current buffer is
                        guaranteed to be the buffer associated with the process.

           "output" :   This parameter determines how output from the process is
                        is processed.  If the 'value' is the empty string "", output
                        will go to the end of the buffer associated with the process
                        and the point will be left there.
                        If value is ".", output will go at the current buffer position.
                        If value is "@", output will go to the end of the buffer but
                        the point will not move.  Otherwise, 'value' is the name of
                        a slang function with arguments: (pid, data) where pid has
                        the above meaning and data is the output from the process.

## function signal_process

### Synopsis

signal_process

### Usage

Void signal_process (Int_Type pid, Int_Type signum);

### Description

This function may be used to send a signal to the process whose process handle is given by pid . The pid must be a valid handle that was returned by open_process .

### See also

open_process , kill_process , send_process_eof