Dne 03. 06. 19 v 13:00 Kamil Dudka napsal(a):
> Now I'm working on signal SIGTERM handling and I would like
to kill all
> processes related to the main mock process.
> What do you think is it a good
> idea to kill all processes, or do we want to kill the main process only?
> And what about SIGINT so-called KeyInterrupt in python? Same reaction?
Your question is missing some context. Are you trying to improve signal
handling in your own code that uses mock, or are you trying to improve
signal handling in the implementation of mock itself?
I will try to clarify this.
In past, when you send SIGKILL to Mock, then only Mock terminated. It leaves behind any
running rpmbuild or dnf.
Jan is working on fix for this use case:
https://github.com/rpm-software-management/mock/issues/153
As part of this work, we asked ourself the question: should mock clean up after itself
when exiting?
But I wonder what should be correct/expected behaviour? E.g., is someone running daemons
in mock using 'chroot' or
'shell' command and would be surprised if Mock will kill it when Mock will
terminate?
Or we can assume that when Mock terminate then nothing should be running in the chroot?
What are your use-cases?
--
Miroslav Suchy, RHCA
Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys