pike.git/
NT/
tools/
sprshd
Branch:
Tag:
Non-build tags
All tags
No tags
2000-06-28
2000-06-28 22:21:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
25f6bcee5494f71d401f7765de62cd2186a2d988 (
35
lines) (+
25
/-
10
)
[
Show
|
Annotate
]
Branch:
7.9
support for killing the child process with OOB data
Rev: NT/tools/sprshd:1.20
73:
} }
-
#ifdef WINE
-
void my_proxy(Stdio.File from, Stdio.File to)
-
{
-
while(string s=from->read(128,1))
-
if(to->write(s)!=strlen(s))
-
return;
-
-
}
-
#endif
-
+
string opt_path(string p1, string p2) { return ( ( ((p1||"") + ";" + (p2||"")) / ";" ) - ({""}) ) * ";";
220:
default: #ifdef WINE
+
void my_proxy(Stdio.File from, Stdio.File to)
{
-
+
while(string s=from->read(128,1))
+
if(to->write(s)!=strlen(s))
+
return;
+
if(p) p->kill(9); /* DIE! */
+
}
+
+
{
werror("Proxying.....\n"); object p3=Stdio.File(); #ifdef NO_IPC
233:
} #endif
+
#if __VERSION__ >= 0.699999
+
write("Trapping OOB\n");
+
if(io->read_oob)
+
{
+
thread_create(lambda() {
+
while(1)
+
{
+
string tmp=io->read_oob(1);
+
if(!tmp || !sizeof(tmp)) return;
+
werror("**Interrupt received, killing child.\n");
+
p->kill(9);
+
}
+
});
+
}
+
#endif
+
mixed err=catch { p=Process.create_process(cmd, ([