Properly initialize shadow_fd to -1