By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

signal.SIGHUP handling

P: n/a

hi, please help to find out where is the problem:

i'm trying to hadle signal.SIGHUP (in unix prompt: kill -HUP <pid>)

first of all, i'm trying to do:
signal.signal(signal.SIGHUP, signal.SIG_IGN)

- it works fine (signal ignored)
but if use my handler, than it raises "Interrupted system call":

# all i need to do it is reopen log-file.
# It was opened at the time of pragramm start
def myHandler(signum, frame):
sys.stdout = sys.stderr = open("mylog.log", "a+")

signal.signal(signal.SIGHUP, myHandler)

Best regards,
Maksim Kasimov
mailto: ma************
Sep 9 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.