-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[io] Prevent losing data due to SIGTERM (under Unix) #18403
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
base: master
Are you sure you want to change the base?
Conversation
Test Results 20 files 20 suites 4d 6h 27m 36s ⏱️ For more details on these failures, see this check. Results for commit beb694c. ♻️ This comment has been updated with latest results. |
@ferdymercury The SIGILL and SIGTERM signals aren't generated under Windows. They're included for ANSI compatibility. See the signal reference |
Let's have a look to the tests once again |
// gentle save and close if SIGTERM | ||
if (signum == SIGTERM) { |
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 I understood correctly, this would mean that after code similar to:
root [] TFile f(filename, RECREATE);
root [] do_stuff();
root [] if (all_is_well) f.Write();
We have a different behavior if the user does:
root [] .q
and
send SIGTERM
Where the former does not write the file while the later would now write the file.
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.
Yes.
f6f707e
to
4f28265
Compare
Fixes root-project#13300 [core] Implement public static functions allowing save and close [io] only SaveAndClose TFiles and derived TSystemFile, in general, does not implemente Write and Close methods [io] Do not write/close files open in READ mode [core] use TDirectory instead TMethodCall
This Pull request:
Changes or fixes:
Fixes #13300
Checklist: