-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-33031 Add the option to terminate a child process gracefully #19317
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Gavin Halliday <[email protected]>
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33031 Jirabot Action Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghalliday - looks good. Q. re. whether should fire SIGKILL after graceful period if still running.
@@ -1690,7 +1690,7 @@ class CWindowsPipeProcess: implements IPipeProcess, public CInterface | |||
doCloseError(); | |||
} | |||
|
|||
void abort() | |||
void abort(bool gracefull) override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: and add 'virtual' ?
@@ -2416,7 +2416,7 @@ protected: friend class PipeWriterThread; | |||
} | |||
} | |||
|
|||
void abort() | |||
void abort(bool graceful) override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: and add 'virtual' ?
else | ||
::kill(pipeProcess,SIGKILL); // if this doesn't kill it we are in trouble | ||
::kill(pipeProcess,signalToSend); // if this doesn't kill it we are in trouble |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if graceful, should there be a grace period, which if exceeded fires a SIGKILL anyway..?
@@ -1635,7 +1635,7 @@ class CDeployTask : public CInterface, implements IDeployTask | |||
{ | |||
retcode = 5; | |||
errbuf.clear().append("Invalid or missing key passphrase. "); | |||
pipe->abort(); | |||
pipe->abort(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this/almost all should be graceful too really, but to avoid potential deadlock from misbehaving child, it would be good if abort fired a SIGKILL after a given period of grace time..
Type of change:
Checklist:
Smoketest:
Testing: