pike.git/
NT/
tools/
sprshd
Branch:
Tag:
Non-build tags
All tags
No tags
2000-09-01
2000-09-01 18:08:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>
6e4162b6871ca562999545d637e2dc462baf4231 (
10
lines) (+
9
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
More paranoid use of pid->wait().
Rev: NT/tools/sprshd:1.21
1:
#!/usr/local/bin/pike
+
/* -*- Pike -*- */
inherit Stdio.Port;
273:
} io->write(sprintf("%4c",0));
-
io->write(sprintf("%4c",
p
->
wait
())
)
;
+
int code;
+
if (catch { code = p->wait(); }) {
+
// wait() failed.
+
io->write(sprintf("%4c",
-
1));
+
} else {
+
io-
>
write
(
sprintf("%4c", code
));
+
}
}else{ werror("dir=%s\n",dir); werror(master()->describe_backtrace(err));