Newsgroups: comp.lang.python
From: Philip Semanchuk <phi...@semanchuk.com>
Date: Thu, 18 Jun 2009 23:19:09 -0400
Local: Thurs, Jun 18 2009 11:19 pm
Subject: KeyboardInterrupt eats my error and then won't be caught
Hi all,
I need help understanding how Python deals with Ctrl-C. A user has reported a bug in my posix_ipc module. When a Python app is However, the caller never sees the error I set. Instead they get a # ----------------------------------- sem = posix_ipc.Semaphore(None, posix_ipc.O_CREX) try: sem.close() I expected that code to raise a posix_ipc.Error with the text, "The Instead a KeyboardInterrupt error is propagated up to the interpreter I have verified that the C function sem_wait() returns -1 (failure), If I substitute my sysv_ipc module for posix_ipc (very similar to I see this w/Python 2.5 under OS X and also w/Python 2.5 under Ubuntu If anyone wants to look at my C code, the relevant case statement is http://semanchuk.com/philip/posix_ipc/ Any suggestions would be appreciated. Thanks You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||