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.
Synopsis
kill_process
Usage
Void kill_process (Int_Type id);
Description
Kill the subprocess specified by the process handle id .
Synopsis
open_process
Usage
Int_Type open_process (name, argv1, argv2, ..., argvN, N);
Description
Returns id of process, -1 upon failure.
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.
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
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.
Synopsis
send_process
Usage
Void send_process (Int_Type id, String s);
Description
Undocumented
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 .
Synopsis
set_process
Usage
Void set_process (pid, what, value)
Int_Type pid;
String_Type what;
String_Type or Ref_Type 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 status parameter depends
upon the flags parameter. If the process
exited normally, then status indicates its
return status. Otherwise 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 or a reference to a slang function that
takes arguments: (pid, data) where pid has
the above meaning and data is the output from the 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