run-program-inner: return only output stream
Since we *always* wait until process ends, returning write descriptor doesn't make much sense anymore. stream_read has also output from stderr.
This commit is contained in:
parent
cea077eeed
commit
1d8f4ff101
2 changed files with 5 additions and 7 deletions
|
|
@ -370,11 +370,7 @@ si_run_program_inner(cl_object command, cl_object argv, cl_object environ) {
|
|||
parent_read = ecl_fixnum(ecl_nth_value(the_env, 2));
|
||||
parent_error = ecl_fixnum(ecl_nth_value(the_env, 3));
|
||||
|
||||
stream_write = ecl_make_stream_from_fd(command, parent_write,
|
||||
ecl_smm_output, 8,
|
||||
ECL_STREAM_DEFAULT_FORMAT,
|
||||
@':default');
|
||||
|
||||
/* descriptor is closed in the stream finalizer */
|
||||
stream_read = ecl_make_stream_from_fd(command, parent_read,
|
||||
ecl_smm_input, 8,
|
||||
ECL_STREAM_DEFAULT_FORMAT,
|
||||
|
|
@ -384,8 +380,10 @@ si_run_program_inner(cl_object command, cl_object argv, cl_object environ) {
|
|||
exit_status = ecl_nth_value(the_env, 1);
|
||||
|
||||
/* close unused descriptors */
|
||||
close(parent_write);
|
||||
close(parent_error);
|
||||
@(return cl_make_two_way_stream(stream_read, stream_write) exit_status)
|
||||
|
||||
@(return stream_read exit_status)
|
||||
}
|
||||
|
||||
cl_object
|
||||
|
|
|
|||
|
|
@ -1347,7 +1347,7 @@
|
|||
(or null fixnum)))
|
||||
(proclamation si:killpid (fixnum fixnum) fixnum)
|
||||
(proclamation si:run-program-inner (string (or list string) list)
|
||||
(values two-way-stream integer))
|
||||
(values file-stream integer))
|
||||
(proclamation si:spawn-subprocess (string (or list string) list t t t)
|
||||
(values (or null integer) fixnum fixnum fixnum))
|
||||
(proclamation ext:terminate-process (t &optional gen-bool) null)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue