I am running a perl script on a Linux host. I\'m trying to write a script that forks, where the child starts a program that takes forever and the parent times out after 5 s
Chances are that you are useing neither strict nor POSIX in your script, so SIGTERM is being interpreted as the bareword "SIGTERM", which isn't behaving in a useful way.
use strict to make this accidental bareword into an error, then use POSIX to pull in the SIGTERM constant.