lib/drmtest: Avoid calling exit handlers multiple times
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 8 Sep 2013 12:03:03 +0000 (14:03 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 8 Sep 2013 12:03:03 +0000 (14:03 +0200)
commitfbd64de6be923e339675667525fcd1a294d9b172
tree4c30880f12f0ff368bc9164e66393dcc1eb2aa18
parentb3dadedd2e899a8e3dd916aa8b0df6481e724d5a
lib/drmtest: Avoid calling exit handlers multiple times

- reset the count when forking
- don't add the same handler multiple times
- don't restore the exit signal handlers in the forked helper
  process
- reset the exit handler count once called to make sure we don't call
  it multiple times when dying
- don't wait for the signal helper if it's gone already

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
lib/drmtest.c