I've tried your code but it required a small change to run for me under perl v5.20.3. As it stands, the -t causes it grief:
[11541] START [02@21:54:27] Warning: Use of "-t" without parentheses i +s ambiguous at ./sigs.pl line 61. [11541] START [02@21:54:27] Use of ?PATTERN? without explicit operator + is deprecated at ./sigs.pl line 61. [11541] START [02@21:54:27] Search pattern not terminated or ternary o +perator parsed as search pattern at ./sigs.pl line 61. Leaving...
So changing line 61 to be this:
logger(INFO, sprintf("We %s connected to a TTY", -t () ? 'ARE' : 'ARE +NOT'));
It then runs and appears to handle the TSTP and subsequent CONT perfectly well. Which version of perl are you running and on which OS?
In reply to Re: Signal handler - correct way to hijack TSTP
by hippo
in thread Signal handler - correct way to hijack TSTP
by seki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |