Using ctrl-c in interactive mode leaves temporary files on disk
Issue #24
resolved
Repro:
- Open a terminal anywhere
- use "ssh-deploy-key" (no parameters)
- Enter any password
- Hit ctrl-c
Result:
Program quits, throws a stack trace (pasted below) but two files are left in the current direction; "ssh-delpoy-key.smart-append" (not a typo, the file does have "delpoy" in it), and "ssh-deploy-key.overwrite".
If the program is quit by entering "quit", these files are cleaned up as expected. But sending a SIGTERM to the process doesn't clean up as expected.
Resolutions:
- Handle SIGNTERM explicitly
- Write these files to /tmp, so that they get auto-cleaned by the OS.
Traceback (most recent call last): File "/usr/local/bin/ssh-deploy-key", line 239, in <module> line = sys.stdin.readline() KeyboardInterrupt
Comments (2)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
Leo's PR seems to fix this.