Trying to make close sleep on Linux

Viewed 516

I need to investigate/test the behavior of some code on Linux under conditions where close might be interrupted by signal handlers (either with or without SA_RESTART). What is the most convenient setup to make the close syscall sleep for a measurable window of time during which I could try to hit the process with a signal? Some ideas:

  • Intentionally slow/non-responsive NFS mount
  • Custom FUSE driver

But since these are a bit of a pain to setup, I'm wondering if there's anything more off-the-shelf I could use that could give the desired behavior.

1 Answers
Related