Dir is not cleaned when I hit ctrl+c
See original GitHub issueI’m using tmp package in unit tests with tmp.setGracefulCleanup();
. I’m creating temp directory for tests with unsafeCleanup = true
.
It works fine if I don’t hit ctrl+c to interrupt tests. Then the temp dir is not deleted. How can I get it deleted automatically in this case?
Issue Analytics
- State:
- Created 6 years ago
- Comments:28
Top Results From Across the Web
Cleanup tmp dirs when hitting CTRL-C from perl -d debug ...
When the program terminates, any objects that are still in scope are cleaned up by calling their DESTROY methods. File::Temp->newdir returns a ...
Read more >Can I run a command after the user uses Ctrl-C to kill a ...
I'ma head off the obvious answers to this: use a script. I really want to keep using the same command as the rest...
Read more >linux - What happens if mv is interrupted? - Super User
@Wesley: No, there will be no partial file. If the system stays up (e.g., you hit ctrl-C), it will be removed automatically. If...
Read more >Windows Admin Center known issues | Microsoft Learn
Ctrl -C to copy doesn't work, it will always send the Ctrl-C break command to the console. Copy from the right-click context menu...
Read more >How is the /tmp directory cleaned up? - Ask Ubuntu
The default value of $TMPTIME is 0, which means every file and directory in /tmp gets deleted. $TMPTIME is an environment variable defined...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JanBednarik thank your very much. I think that I have found the problem. There exists a SIGINT event and tmp should be listening on that, too. The only problem is that under Windows one must take a different approach. I will look into this.
@silkentrance Would it be possible to make some time to merge this? It would be very helpful for me.