Sponsored Content
Full Discussion: waitpid and grandchildren
Top Forums Programming waitpid and grandchildren Post 302643215 by kshots on Friday 18th of May 2012 04:25:48 PM
Old 05-18-2012
Hmm... actually, I just found that a solution should present itself in the 3.4 kernel, when it comes out. I can't post a URL with where I got this from (because apparently I need 5 posts for that), but here's a quote from the API changes page:
Quote:
The PR_SET_CHILD_SUBREAPER prctl() operation allows a "service manager" process to mark itself as a sort of 'sub-init', able to stay as the parent for all orphaned processes created by the started services. All SIGCHLD signals will be delivered to the service manager. There is a corresponding PR_GET_CHILD_SUBREAPER prctl() operation. Planned users of this feature include D-Bus and systemd.
This User Gave Thanks to kshots For This Post:
 

3 More Discussions You Might Find Interesting

1. Programming

problems with FORK() and WAITPID()

Dear All, I'm trying to write multithreading TCP Daemon which executes external program when new network connection arrives on a socket. After accept() I'm doing fork() for initiating of new child process, in which will be executed external program. After child creation I'm doing fork() again,... (3 Replies)
Discussion started by: Polkovnik
3 Replies

2. Programming

waiting for multiple childs - C - waitpid

Hi gurus, I would like to fork more children and then write their return values: so far I tried: #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> int main(void) { pid_t pid; int rv=0, i; ... (5 Replies)
Discussion started by: wakatana
5 Replies

3. Programming

[C]Fork and waitpid

Hi folks, I am writing a simple program to understand how fork() and waitpid works, but it doesn't seem that is working like I wanted. if(fork()==0){ //el hijo pid1=getpid(); printf("\nSoy el hijo %d",pid1); }else { //el padre if (fork()==0) { //el hijo pid2=getpid();... (2 Replies)
Discussion started by: lamachejo
2 Replies
rpc.lockd(8)						      System Manager's Manual						      rpc.lockd(8)

NAME
rpc.lockd, lockd - Network lock daemon SYNOPSIS
/usr/sbin/rpc.lockd [-b hostname] [-c] [-d debug] [-g graceperiod] [-h hashsize] [-s] [-t timeout] OPTIONS
The default behavior will create and bind a socket for each protocol per interface on the system. When the -b switch is specified, one socket per protocol will be created and bind to the passed IP address. Available only on TruCluster Server systems. This option starts the clusterwide lock daemon, which helps provide highly available NFS service. Do not use -c directly. Highly available NFS service is config- ured by default and typically does not require intervention. If you do need to start the clusterwide lock daemon, use the CAA command, caa_start cluster_lockd. For more information, see the TruCluster Server Administration manual. Internal Use Only. Use this option only under the direction of technical support personnel. Causes the rpc.lockd daemon to use the variable graceperiod (in seconds) as the grace period dura- tion instead of the default value of 15 seconds. Internal Use Only. Causes the rpc.lockd daemon to use the variable timeout (in seconds) as the interval instead of the default value of 5 seconds to retransmit a lock request to the remote server. DESCRIPTION
The rpc.lockd daemon processes lock requests that are either sent locally by the kernel or remotely by another lock daemon. The NFS locking service makes this advisory locking support possible by using the fcntl system call and the lockf subroutine. The rpc.lockd daemon forwards lock requests for remote data to the server site's lock daemon. The rpc.lockd daemon then requests the status monitor daemon, rpc.statd, for monitor service. The reply to the lock request is not sent to the kernel until the status daemon and the server site's lock daemon have replied. If either the status monitor or server site's lock daemon is unavailable, the reply to a lock request for remote data is delayed until all daemons become available. When a server recovers, it waits for a grace period for all client site lock daemons to submit reclaim requests. Client site lock daemons are notified by rpc.statd of the server recovery and promptly resubmit previously granted lock requests. If a client site's lock daemon fails to secure previously granted locks at the server site, it sends the signal SIGLOST to all the processes that were previously holding locks and cannot reclaim them. SEE ALSO
Commands: rpc.statd(8) Functions: fcntl(2), signal(2), lockf(3) rpc.lockd(8)
All times are GMT -4. The time now is 04:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy