> 
> The trap gets executed, meaning that I get the output of the 
> print, during the execution of my program, and the pid 
> matches the one from the process status list. 

To clarify: the procedure between the trap brackets gets executed when I press Ctrl-C, and the pid in the printed text matches the one of the executable called from within the ruby script... was a bit ambiguous when I just reread it.