A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/333386.html below:

signal.SIGHUP handling

signal.SIGHUP handling signal.SIGHUP handlingMaksim Kasimov maksim.kasimov at gmail.com
Fri Sep 9 06:58:57 EDT 2005
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: maksim.kasimov at gmail.com

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4