use raise() instead of signal()