473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SIGTERM handling

Hi.

I have tried this script:

from ctypes import cdll, c_int
from signal import SIGTERM, SIGINT
from time import sleep
msvcrt = cdll.LoadLibrary("MSVCR71") # is this the lib to use?
sig = c_int(SIGTERM)
raise_ = getattr(msvcrt, "raise")
raise_(sig)
sleep(10)
The problem is that SIGTERM causes the program to exit (without calling
atexit registered functions).

Why?
In the MSDN documentations it is written that SIGTERM is by default
ignored and in the Python documentation for signal module it is written
that there should be no handler for SIGTERM.

Thanks Manlio Perillo
May 5 '06 #1
0 1214

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3254
by: WSeeger | last post by:
When creating a new class, is it encouraged to always include error handling routines within your LET and GET procedures? It's seems that most text books never seem to include much about error...
0
2393
by: Andrew Athan | last post by:
I have a python program (snippet below) which does not want to seem to die when I issue a sys.exit() inside the SIGTERM handler. The output below is generated as the result of sending several...
9
3185
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
0
1143
by: Brian Reichert | last post by:
On another mailing list, there is a discussion about whether or not it is adequate/proper to manage the MySQL server process via a watchdog script (namely, DJB's daemontools). The point behind...
2
9450
by: spam | last post by:
I hope you will forgive the slightly OT post, but I haven't had any luck getting answers in the Unix/Solaris groups. I know the C++ standard doesn't mention signals because they are a...
4
4286
by: Teresa | last post by:
Platform: Unix Tru 64 OSF 4.0D Problem: I spawned 3 processes. Proc A, B and C. My problem is that the parent process, proc A, sends SIGTERM to proc C; However, proc C does not exit some...
3
2835
by: Stefan Johansson | last post by:
Hi all I'am moving from Visual Foxpro and have a question regarding "best practice" error handling in vb .net. In VFP I have always used a "central" error handling object in order to have a...
6
2748
by: Henry Law | last post by:
I'm trying to debug a Perl problem whose symptoms are that a running Perl process either doesn't receive, or fails inexplicably to handle, a SIGTERM sent from the OS during shutdown (Linux Fedora...
0
11549
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.