I am doing time lapse with gphoto2 and EOS 550D and mirror lockup.   Due to MLU, I have to trigger the shutter twice (through an serial port controlled shutter release) for each frame, once to raise the mirror, and a second time to expose.  As a result, some communication between my time lapse script and gphoto2 is required.  I use a hook-script which creates or deletes files _gphoto.init and/or _gphoto.start so that the main script knows the status of gphoto2.  This allows the time lapse script to know when it is safe to trigger the shutter.

In one run, I received the error:

    execve("hook-script.sh") failed: Input/output error
    Hook script returned error code 1 (0x1)
    Hook script "hook-script.sh" init failed. Aborting.

and in another run:

    /bin/sh: Can't open hook-script.sh
    Hook script returned error code 1 (0x1)
    Hook script "hook-script.sh" init failed. Aborting.

I doubt it is a coding error in hook-script.sh, as I've used this hook-script many times.  So I think a rare condition (filesystem problem?) that causes the hook-script execution to fail once in a while.  How can I recover from this failure?  Once the error occurs, the time lapse hangs.

j c