mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 04:52:42 -08:00
run-program: if gray-stream passed, propose continuation
If execution is continued, new stream is created.
This commit is contained in:
parent
6fe66843de
commit
212a60e9bc
1 changed files with 10 additions and 4 deletions
|
|
@ -494,8 +494,11 @@ create_descriptor(cl_object stream, cl_object direction,
|
|||
HANDLE stream_handle = ecl_stream_to_HANDLE
|
||||
(stream, direction != @':input');
|
||||
if (stream_handle == INVALID_HANDLE_VALUE) {
|
||||
FEerror("~S argument to RUN-PROGRAM does not "
|
||||
"have a file handle:~%~S", 2, direction, stream);
|
||||
CEerror(make_constant_base_string("Create a new stream."),
|
||||
"~S argument to RUN-PROGRAM does not have a file handle:~%~S",
|
||||
2, direction, stream);
|
||||
create_descriptor(@':stream', direction, child, parent);
|
||||
return;
|
||||
}
|
||||
DuplicateHandle(current, stream_handle,
|
||||
current, child, 0, TRUE,
|
||||
|
|
@ -532,8 +535,11 @@ create_descriptor(cl_object stream, cl_object direction,
|
|||
if (*child >= 0) {
|
||||
*child = dup(*child);
|
||||
} else {
|
||||
FEerror("~S argument to RUN-PROGRAM does not "
|
||||
"have a file handle:~%~S", 2, direction, stream);
|
||||
CEerror(make_constant_base_string("Create a new stream."),
|
||||
"~S argument to RUN-PROGRAM does not have a file handle:~%~S",
|
||||
2, direction, stream);
|
||||
create_descriptor(@':stream', direction, child, parent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue