• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Python Programming in Linux Question

Gracey

OSNN One Post Wonder
#1
Hello,
I was wondering how i catch various signals in nix python so i can exit my programs gracefully? Please tell me

Thanks
 
Last edited:

Webby Alisha

OSNN One Post Wonder
#2
Re: Linux Question

Hello,
I was wondering how i catch various signals in nix python so i can exit my programs gracefully? Please tell me

Thanks
Simply "import signal", and see documention of that module. But bear in mind that signals are weird with Python.
The atomic unit of Python execution can span a C external function
call, and that can take an indefinitely long time. So delivery of
signals at the Python level can be delayed.
 
Last edited by a moderator:

Xie

- geek -
#3
Re: Linux Question

You should add the fact that your looking for Python help in the title as it's not really a "Linux" question but more of a programming one. ;)
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown