- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- signal not delivered
Operating System - Linux
1748214
Members
3272
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 02:44 AM
тАО10-11-2006 02:44 AM
signal not delivered
I write a C program.
I set a signal handler for SIGTERM with sigaction. sigaction returns ok, everything seems fine.
A moment later, when the program is in a sleep(), I send a SIGTERM to the process. And the problem : the signal is not delivered, the process does not interrupt its sleep().
Has anyone encountered this problem. Why is my signal sometimes yes and sometimes not delivered ?
I set a signal handler for SIGTERM with sigaction. sigaction returns ok, everything seems fine.
A moment later, when the program is in a sleep(), I send a SIGTERM to the process. And the problem : the signal is not delivered, the process does not interrupt its sleep().
Has anyone encountered this problem. Why is my signal sometimes yes and sometimes not delivered ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 02:59 AM
тАО10-11-2006 02:59 AM
Re: signal not delivered
Hi,
by design.
From man 3C sleep
"If a SIGALRM is generated for a multi-threaded process, it may not be delivered to a thread currently in sleep(). See sigwait(2) man page for details. In a multi-threaded process delivery of a SIGALRM to a
thread in sleep() simply causes sleep() to return without invoking the SIGALRM handler."
by design.
From man 3C sleep
"If a SIGALRM is generated for a multi-threaded process, it may not be delivered to a thread currently in sleep(). See sigwait(2) man page for details. In a multi-threaded process delivery of a SIGALRM to a
thread in sleep() simply causes sleep() to return without invoking the SIGALRM handler."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 03:05 AM
тАО10-11-2006 03:05 AM
Re: signal not delivered
Hi,
Thank you for your answer.
This man page is not applicable.
My process is mono-threaded and I try to deliver the signal SIGTERM, not SIGALRM.
Thank you for your answer.
This man page is not applicable.
My process is mono-threaded and I try to deliver the signal SIGTERM, not SIGALRM.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP