Invoke trapexit after removing the pid, in case of exn in the trapexit fn
Update build products