frerich / clcache

A compiler cache for MSVC, much like ccache for gcc
Other
325 stars 83 forks source link

Ignore SIGINT and SIGTERM #233

Closed siu closed 8 years ago

siu commented 8 years ago

Currently clcache does not attempt to handle user signals. It may happen that the user presses Ctrl-C while a manifest file is being written or the stats are being updated, etc. in that case the cache may get corrupted.

With this change SIGINT and SIGTERM are ignored avoiding that problem. The signals are ignored for the whole execution of clcache but in the future it can be improved and ignore them in smaller sections.

siu commented 8 years ago

I reordered the includes and had to change the style to make appveyor happy, I can remove those commits from the PR if you don't want them.

codecov-io commented 8 years ago

Current coverage is 88.84% (diff: 100%)

Merging #233 into master will increase coverage by 0.04%

@@             master       #233   diff @@
==========================================
  Files             1          1          
  Lines           982        986     +4   
  Methods           0          0          
  Messages          0          0          
  Branches        156        156          
==========================================
+ Hits            872        876     +4   
  Misses           83         83          
  Partials         27         27          

Powered by Codecov. Last update 547eca8...8a162c0

frerich commented 8 years ago

I think this makes sense, and the patch looks good. Merged, thanks!