- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: MUTEX var management in fork/exec context
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
Discussions
Discussions
Forums
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
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
тАО04-27-2010 01:47 AM
тАО04-27-2010 01:47 AM
I'm using MUTEX varibales in a multithread context to protect data integrity.
In the same context I have to use fork/exec paradigm and the CHILD processes ARE NOT multithreading.
My question is: how the MUTEX variables are managed by the child process? It is needed to unlock them in the child code, before proceeding?
Thanks
Giuseppe
Solved! Go to Solution.
- Tags:
- pthread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 01:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 05:17 AM
тАО04-28-2010 05:17 AM
Re: MUTEX var management in fork/exec context
It is needed to reset signals handling mechanism in the child process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 05:28 AM
тАО04-28-2010 05:28 AM
Re: MUTEX var management in fork/exec context
> Another question: how to manage signals in fork/exec context?
The manpages for 'fork()' note:
"The child process inherits the following attributes from the parent process:
...
Signal handling settings (SIG_DFL, SIG_IGN, address).
...[BUT]...
The child process differs from the parent process in the following ways:
The set of signals pending for the child process is initialized to the empty set."
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 06:10 AM
тАО04-28-2010 06:10 AM
Re: MUTEX var management in fork/exec context
if I have well understood, the child inherits all signals handling settings.
But it is not clear for me the meaning of the sentence:
"The set of signals pending for the child process"
Many thanks
Giuseppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 06:37 AM
тАО04-28-2010 06:37 AM
Re: MUTEX var management in fork/exec context
> But it is not clear for me the meaning of the sentence: "The set of signals pending for the child process is initialized to the empty set."
I read this to say that any signals that were pending (delivery) because they were blocked by your code would simply be discarded so that the child process created by the fork() would be devoid of un-delivered signals.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 06:53 AM
тАО04-28-2010 06:53 AM
Re: MUTEX var management in fork/exec context
so, no actions for signal handling are needed in child process code, right?
Giuseppe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 09:58 AM
тАО04-28-2010 09:58 AM
Re: MUTEX var management in fork/exec context
If you are going to exec, you need to rearm the signal handlers.