Add some tentative duplicate handling
authorTim Pepper <timothy.c.pepper@linux.intel.com>
Sat, 15 Sep 2012 00:07:02 +0000 (17:07 -0700)
committerTim Pepper <timothy.c.pepper@linux.intel.com>
Sat, 15 Sep 2012 00:07:02 +0000 (17:07 -0700)
commit2ea5e514437af0e99cd66296797e4829bb601d43
tree763a8e361348af2b271445a7e981e8e691e176bc
parentccfb139a220cc8da2092198a409626d89c4c3667
Add some tentative duplicate handling

The corewatcher needs to be ratelimited a bit for extremely crashy
applications.  For example mate's marco will respawn as much as a hundred
times in a second.  In the case of two cores within the same second the
existing code collides in the hash table, so simply note that and unlink
the core file which is under processing currently instead of erroring
back up the stack to the main loop.  Do similarly for core files which
match within two characters at the end of the filename (ie: same time
mod 100 seconds).

This does have a bug though as the sent core is also being unlinked instead
of persisting, but it's a crude start anyway.  Still needs refining and
also the space needs tmp watched.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
src/coredump.c