pike.git/
NT/
tools/
sprshd
Branch:
Tag:
Non-build tags
All tags
No tags
1998-01-25
1998-01-25 08:18:46 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
d6a1a8032ce1bddfb5f7bab06e2eb63ca7a28a18 (
15
lines) (+
13
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
now makes sure to capture *all* input
Rev: NT/tools/sprshd:1.5
2:
inherit Stdio.Port;
+
void monitor(object(Stdio.File) io, object proc)
+
{
+
proc->wait();
+
io->close("rw");
+
io->close();
+
destruct(io);
+
}
+
void handle_incoming_connection(object(Stdio.File) io) { object p;
60:
"stdout":p2, "stderr":p2, "cwd":dir,
-
])); };
+
]));
+
};
-
destruct(p2);
+
if(!err) {
-
+
thread_create(monitor,p2,p);
while(1) { string s=pi->read(1000,1);
76:
io->write(sprintf("%4c",0)); io->write(sprintf("%4c",p->wait())); }else{
+
destruct(p2);
io->write(sprintf("%4c",0)); io->write(sprintf("%4c",69)); }