* Calculate the open(2) flags ahead of time.
* Move the open(2) until after we set up the alarm. This means that
we might not actually set `fd' at all, if we get delayed and the
alarm goes off.
* Use a separate static (because setjmp(3)) variable to record the
fcntl(2) return code.
* Use `goto' and labels for the control flow, rather than having
everything in an `else' branch.
* Use `switch' to pick the results of fcntl(2) apart.