Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
25f6bcee
Commit
25f6bcee
authored
24 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
support for killing the child process with OOB data
Rev: NT/tools/sprshd:1.20
parent
ac77cc33
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NT/tools/sprshd
+24
-10
24 additions, 10 deletions
NT/tools/sprshd
with
24 additions
and
10 deletions
NT/tools/sprshd
+
24
−
10
View file @
25f6bcee
...
...
@@ -73,16 +73,6 @@ void monitor(object(Stdio.File) io, object proc)
}
}
#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,6 +210,14 @@ void handle_incoming_connection(object(Stdio.File) io)
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();
...
...
@@ -233,6 +231,22 @@ void handle_incoming_connection(object(Stdio.File) io)
}
#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,
([
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment