fix more things

This commit is contained in:
Bennet Bleßmann
2025-07-19 21:44:28 +02:00
committed by Bennet Bleßmann
parent 003e9d4610
commit 2b052bf8dd
2 changed files with 6 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
process_create(Exe, Args, Options) :- process_create(Exe, Args, Options) :-
must_be(chars, Exe), must_be(chars, Exe),
must_be(list(chars), Args),
must_be(list, Options), must_be(list, Options),
check_option(Sin, find_stdio(Sin, stdin, Options), valid_stdio, [std], Stdin), check_option(Sin, find_stdio(Sin, stdin, Options), valid_stdio, [std], Stdin),
check_option(Sout, find_stdio(Sout, stdout, Options), valid_stdio, [std], Stdout), check_option(Sout, find_stdio(Sout, stdout, Options), valid_stdio, [std], Stdout),
@@ -37,9 +38,9 @@ valid_stdio([file, Path]) :- must_be(chars, Path).
find_env([env, ME], Options) :- member(env(E), Options), maplist(assign_to_list, E, ME). find_env([env, ME], Options) :- member(env(E), Options), maplist(assign_to_list, E, ME).
find_env([environment, ME], Options) :- member(environment(E), Options), maplist(assign_to_list, E, ME). find_env([environment, ME], Options) :- member(environment(E), Options), maplist(assign_to_list, E, ME).
assign_to_list(N=V, [N,v]). assign_to_list(N=V, [N,V]).
valid_cwd(Cwd). valid_cwd(Cwd) :- var(Cwd) -> true ; must_be(chars).
valid_env([env, E]) :- valid_env_(E). valid_env([env, E]) :- valid_env_(E).
valid_env([environment, E]) :- valid_env_(E). valid_env([environment, E]) :- valid_env_(E).

View File

@@ -8510,7 +8510,7 @@ impl Machine {
.map_err(|stub_gen| stub_gen(&mut self.machine_st))?; .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
self.machine_st self.machine_st
.bind(args[2].as_var().unwrap(), stream.into()); .bind(args[1].as_var().unwrap(), stream.into());
Stdio::from(writer) Stdio::from(writer)
} }
@@ -8539,11 +8539,10 @@ impl Machine {
self.indices self.indices
.add_stream(stream, atom!("process_create"), 3) .add_stream(stream, atom!("process_create"), 3)
.map_err(|stub_gen| stub_gen(&mut self.machine_st)) .map_err(|stub_gen| stub_gen(&mut self.machine_st))?;
.unwrap();
self.machine_st self.machine_st
.bind(args[2].as_var().unwrap(), stream.into()); .bind(args[1].as_var().unwrap(), stream.into());
Stdio::from(reader) Stdio::from(reader)
} }