get_process_input
Void get_process_input (Int_Type tsecs);
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.
kill_process
Void kill_process (Int_Type id);
Kill the subprocess specified by the process handle id
.
open_process
Int_Type open_process (name, argv1, argv2, ..., argvN, N);
Returns id of process, -1 upon failure.
process_mark
User_Mark process_mark (Int_Type id);
This function returns the user mark that contains the position of the last output by the process.
Whether or not to silently kill a process at exit
Void process_query_at_exit (Int_Type pid, Int_Type query)
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.
open_process, kill_process, exit_jed
run_shell_cmd
Void run_shell_cmd (String cmd);
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.
send_process
Void send_process (Int_Type id, String s);
Undocumented
send_process_eof
send_process_eof (Int_Type pid);
This function closes the stdin
of the process specified by the
handle pid
.
set_process
Void set_process (Int_Type pid, String what, String value);
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.
signal_process
Void signal_process (Int_Type pid, Int_Type signum);
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
.
open_process, kill_process, send_process_eof