Are you doing anything else in your script? Are you sure that the delay is happening after the exit()? The only thing I can think that might cause a delay is writing to a filehandle. Exitting closes the filehandles and tries to flush the buffer. If the filehandle blocks, then the close might hang.