Skip to content

Commit 7dd2004

Browse files
committed
---
yaml --- r: 11992 b: refs/heads/master c: 0973bcc h: refs/heads/master v: v3
1 parent 666270b commit 7dd2004

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d3712a287d07402930de18aafebe1912eb056da8
2+
refs/heads/master: 0973bccfe2bf1140021a3f670974bf073bfb5eac
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libcore/run.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ Spawns a process and waits for it to terminate
161161
The process id
162162
"]
163163
fn run_program(prog: str, args: [str]) -> int {
164-
ret waitpid(spawn_process(prog, args, none, none,
165-
0i32, 0i32, 0i32));
164+
let pid = spawn_process(prog, args, none, none,
165+
0i32, 0i32, 0i32);
166+
if pid == -1 as pid_t { fail; }
167+
ret waitpid(pid);
166168
}
167169

168170
#[doc ="
@@ -190,7 +192,7 @@ fn start_program(prog: str, args: [str]) -> program {
190192
pipe_input.in, pipe_output.out,
191193
pipe_err.out);
192194

193-
if pid == -1i32 { fail; }
195+
if pid == -1 as pid_t { fail; }
194196
libc::close(pipe_input.in);
195197
libc::close(pipe_output.out);
196198
libc::close(pipe_err.out);

0 commit comments

Comments
 (0)