fix unix environ

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@293 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-01-14 22:26:53 +00:00
parent 095e851b00
commit 4414acbdf9
10 changed files with 48 additions and 29 deletions

View File

@@ -240,6 +240,7 @@ exec(Command, [StdIn, StdOut, StdErr], PID) :-
handle_system_error(Error, off, G).
process_inp_stream_for_exec(Error, _, G, L, L) :- var(Error), !,
close_temp_streams(L),
throw(error(instantiation_error,G)).
process_inp_stream_for_exec(null, null, _, L, L) :- !.
process_inp_stream_for_exec(std, 0, _, L, L) :- !.
@@ -252,6 +253,7 @@ process_inp_stream_for_exec(Stream, Stream, _, L, L) :-
process_out_stream_for_exec(Error, _, G, L, L) :- var(Error), !,
close_temp_streams(L),
throw(error(instantiation_error,G)).
process_out_stream_for_exec(null, null, _, L, L) :- !.
process_out_stream_for_exec(std, 1, _, L, L) :- !.
@@ -263,6 +265,7 @@ process_out_stream_for_exec(Stream, Stream, _, L, L) :-
stream_property(Stream, input).
process_err_stream_for_exec(Error, _, G, L, L) :- var(Error), !,
close_temp_streams(L),
throw(error(instantiation_error,G)).
process_err_stream_for_exec(null, null, _, L, L) :- !.
process_err_stream_for_exec(std, 2, _, L, L) :- !.