changed trap() call to take current process's ID directly