Skip to content
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

timemory-timem exits with no output on SIGINT #224

Closed
hidmic opened this issue Sep 15, 2021 · 4 comments · Fixed by #225
Closed

timemory-timem exits with no output on SIGINT #224

hidmic opened this issue Sep 15, 2021 · 4 comments · Fixed by #225

Comments

@hidmic
Copy link
Contributor

hidmic commented Sep 15, 2021

Using timem for some very basic process monitoring is not currently possible whenever the process does not self-terminate but it is supervised and managed using signals instead.

Judging by its code, I suspect this is simply because the handler for SIGINT is the default one, which terminates the process, but I may be missing something. Are there any objections against handling SIGINT (and perhaps SIGTERM) to ensure output files are flushed and closed properly?

@hidmic
Copy link
Contributor Author

hidmic commented Sep 15, 2021

FYI @lneumarkt

@jrmadsen
Copy link
Collaborator

is not currently possible whenever the process does not self-terminate but it is supervised and managed using signals instead

Which process are you referring to here: the timem process itself or the child process that timem is measuring?

@jrmadsen
Copy link
Collaborator

Upon re-reading, I am guessing you want to be able to do something like timem -- sleep 10 and hit Ctrl+C after, say, two seconds and still have timem produce output?

@jrmadsen
Copy link
Collaborator

I think this will be closed by #225

@jrmadsen jrmadsen linked a pull request Sep 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants