Avoid using uninitialized "pid" variable on the exception path.