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

Feature request: Inactivity timeout #52

Open
PinkPandaKatie opened this issue Jul 14, 2015 · 4 comments
Open

Feature request: Inactivity timeout #52

PinkPandaKatie opened this issue Jul 14, 2015 · 4 comments

Comments

@PinkPandaKatie
Copy link

Would it be possible to implement some kind of inactivity timeout, where cpm would exit after a configurable number of seconds? I keep forgetting to exit after copying passwords.

@comotion
Copy link
Owner

I think yeah, that would be a good idea - especially if it were configurable.

@comotion
Copy link
Owner

I took a stab at your proposed inactivity timeout @JSPenguin.
Try setting InactiveTimeout 5
in your ~/.cpmrc and let me know what you think.

@PinkPandaKatie
Copy link
Author

It doesn't seem to work. I think the ptrace protection might be interfering with the alarm, because when I run it under strace, it spits out an error about not being able to enable ptrace protection, and then the timeout works.

Even if I run as root without strace, it does not work.

@comotion
Copy link
Owner

hm, this is possible. I am writing this on a platform where ptrace protection has been disabled due to lack of support in the kernel since most newer distro kernels no longer support tracing self by default. Which also leaves me rather unable to debug this. As you can see from the commits, I've implemented the timeout as a simple alarm() signal reset by user input. Perhaps it's the ptracing child, can you check what is interfering with the delivery of this signal?

@comotion comotion reopened this Jul 17, 2015
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

No branches or pull requests

2 participants