Hi everybody,
on the following there is a contribution on what the process functions could
allow. Those suggestions are extracted from a commercial VLSI design tool
(Cadence Design Framework II) which contains a lisp-like interpreter provided
with process-like functions.
1) run-process
It could be desirable to allow the user to specify a host on which the
process has to be executed. I know it is possible to specify a command like
"rsh <host> <command> <parameters>" but I think it is more clear a syntax
like: (run-process "<command> <parameters> ... :host "<host>")
An other option (available for asynchronous processes only) could be a
scheme post-function to be called when the command execution finishes.
2) Reading from process-output or process-error
An additional "read function" for process-output and/or process-error
channels could be provided with an additional "time-out" parameter
(optional).
Calling this new function (let's call it "process-read") the scheme
execution will be halted, waiting for an input line. When a string is not
provided and the timeout is reached, #f could be returned.
3) Getting the exit status
A function could be provided to save the exit status of a process when
its end occurs. The function (let's call it "process-exit-status")
could receive the process id as a parameter, returning the exit code
or #f if the process is still running.
4) Waiting for a process end
Now it is possible to run a process in a synchronous or asynchronous mode.
When a process is started in asynchronous mode, it is not possible to
change to synchronous mode at all.
A function (let's call it "process-wait") could be implemented to allow
the user to suspend the STk execution until the process specified
terminates.
Note: incoming data should be buffered while process-wait is executing.
5) Waiting for a process output/error
Two functions (let's call them "process-wait-output" and
"process-wait-error") could be implemented to cause STk execution to be
suspended until the process specified is alive and ready for communication.
6) Stopping and resuming a process execution
Two functions ("process-stop" and "process-resume") could be implemented to
allow the user to stop and resume a process execution.
Being possible to send a STOP and CONT signal using kill, I think it is more
clear to add those two functions.
7) Sending Ctrl-d to a process
A function (let's call it "process-close") could be added to allow the user
to send a Ctrl-d command through the input channel to the specified
process.
If someone of you has suggestions, more ideas on process command or on how to
realize them..., any contribution will be well accepted.
Regards
Giorgio Cesana
-------------------------------------------------------------------------------
Giorgio Cesana | SGS-THOMSON Microelectronics
phone +39/39/603.5549 | Central R&D - DAIS
fax +39/39/603.5820 | via C. Olivetti, 2
e-mail cesana_at_venus.unix.st.it | 20041 Agrate B.za (MI) - ITALY
Received on Mon Jan 16 1995 - 16:28:22 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST