connect.c: finish_connect(): allow null pid parameter