- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem with SIGCHLD (Migration from 10.10 to 11.1...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
03-10-2004 01:03 AM
03-10-2004 01:03 AM
Problem with SIGCHLD (Migration from 10.10 to 11.11)
I'm migrating an application from HP-UX 10.10 to HP-UX 11.11 (C and Pro*C).
I have a main process that launches (with vork) several other processes and monitors them (using signal( SIGCHLD, ... ) to be alerted when one child process dies.
I have the following problem : each time a child process dies, the main process seems to hang indefinitely.
The application was working fine on 10.10.
I tried to remove the signal( SIGCHLD, ... ) and the problem disappeared.
Does anyone have any idea on how to solve this problem ?
Thanks,
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 06:32 AM
03-10-2004 06:32 AM
Re: Problem with SIGCHLD (Migration from 10.10 to 11.11)
There are very few calls that are safe inside of a signal handler.
Do you call signal() again in the handler to reset the handling of SIGCHLD? If you do that before you actually wait for the child you can get into an infinite loop as you reenter the signal handler as soon as you call signal().
You really should look into using a more modern call such as sigaction to set up a signal handler. It does not always reset the handler to the default every time a signal is received.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 07:39 PM
03-10-2004 07:39 PM
Re: Problem with SIGCHLD (Migration from 10.10 to 11.11)
I left only:
static void CaptureEndProcess(int va_signal)
{
int vl_infoPID;
int vl_pid;
vl_pid = waitpid(-1,&vl_infoPID,WNOHANG);
signal(SIGCHLD,CaptureEndProcess);
}
but nothing changed.
I even tried:
static void CaptureEndProcess(int va_signal)
{
_exit(0);
}
The process is not terminated when a child dies.
More strange:
if I try to kill the parent process (kill
if I try the same command after a child died, the parent process doesn't die: I have to use kill -HUP (or kill -9) to kill it. I can also kill it with two commandes: kill -26
I don't understand what's going on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 08:09 PM
03-10-2004 08:09 PM
Re: Problem with SIGCHLD (Migration from 10.10 to 11.11)
It looks like the parent process is going somwehere other than your signal handler when a SIGCHLD is recieved. If I remember correctly you need to pass signal() an integer for the signal, a pointer to the function and an integer for the flags. Make sure this part is exactly as you think it is. It might have worked by accident on 10.20 if your function pointer isn't right.
One other thing, are you using a value for the signal (18) or SIGCHLD? It might be different than it used to be, "kill -l" (that's a lower case "L", not a 1) will confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2004 10:42 PM
03-10-2004 10:42 PM
Re: Problem with SIGCHLD (Migration from 10.10 to 11.11)
I am using Oracle 8.1.7.4 and it seems that when I connect to Oracle (EXEC SQL CONNECT), Oracle fusses with the signal handling.
I call again signal( SIGCHLD, ... ) after the connection to Oracle and the problem seems to be solved.
Thanks for the help