- signal happens, triggers perl internals - flag for this signal is set by internals - systemcall is interrupted, $! set to EINTR - perl dispatcher sees flag, starts your signal code However, this code happens to change $! - The assign of undef to $conn happens - You check $conn, see its undef and then go look at $!, but you get the $! left by your signal handler, not the older one you really need. #### local $!;