由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - Perl Q
相关主题
a perl questionwhich shell is the best among csh, ksh, bsh?
file descriptorpthread_kill SIGINT SIG_DFL multithread
[转载] alarm, pause 又一问async-signal safe 问题
Does Linux support thread?Socket programming help
A Unix question多次遇到这种问题:previous declaration of .....
what is the difference between pthread and thr_ ?Can I get the CPU-time of a thread?
does Linux has real time timer?[转载] 写程序 通讯 的 API (IPC )
multithread question[转载] Unix/Posix system programming training
相关话题的讨论汇总
话题: perl话题: exit话题: siginal话题: signal话题: receive
进入Unix版参与讨论
1 (共1页)
j*c
发帖数: 97
1
does perl have any mechanism to handle exceptions? I mean if my script receive
a "kill" siginal, can I have it run some exception handling codes before exit?
thanks.
o***z
发帖数: 133
2
use POSIX;
then use something like sigaction to install a signal handler

【在 j*c 的大作中提到】
: does perl have any mechanism to handle exceptions? I mean if my script receive
: a "kill" siginal, can I have it run some exception handling codes before exit?
: thanks.

D**e
发帖数: 10169
3
yes. you can override the default signal action by supplying your own sub
routine. the name of the signals are defined in signal.h.
change %SIG, set the value corresponding to the signal you want to catch to
the name of your won sub-routine.

receive
exit?

【在 j*c 的大作中提到】
: does perl have any mechanism to handle exceptions? I mean if my script receive
: a "kill" siginal, can I have it run some exception handling codes before exit?
: thanks.

1 (共1页)
进入Unix版参与讨论
相关主题
[转载] Unix/Posix system programming trainingA Unix question
how to check disk available using posix API?what is the difference between pthread and thr_ ?
Semaphores in Linux (转载)does Linux has real time timer?
若问aix系统可以在普通的非ibm机器上装吗?multithread question
a perl questionwhich shell is the best among csh, ksh, bsh?
file descriptorpthread_kill SIGINT SIG_DFL multithread
[转载] alarm, pause 又一问async-signal safe 问题
Does Linux support thread?Socket programming help
相关话题的讨论汇总
话题: perl话题: exit话题: siginal话题: signal话题: receive