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
SYSTEMD-LOGIND.SERVICE(8)				      systemd-logind.service					 SYSTEMD-LOGIND.SERVICE(8)

NAME
systemd-logind.service, systemd-logind - Login manager SYNOPSIS
systemd-logind.service /lib/systemd/systemd-logind DESCRIPTION
systemd-logind is a system service that manages user logins. It is responsible for: o Keeping track of users and sessions, their processes and their idle state. This is implemented by allocating a systemd slice unit for each user below user.slice, and a scope unit below it for each concurrent session of a user. Also, a per-user service manager is started as system service instance of user@.service for each logged in user. o Generating and managing session IDs. If auditing is available and an audit session ID is already set for a session, then this ID is reused as the session ID. Otherwise, an independent session counter is used. o Providing PolicyKit-based access for users for operations such as system shutdown or sleep o Implementing a shutdown/sleep inhibition logic for applications o Handling of power/sleep hardware keys o Multi-seat management o Session switch management o Device access management for users o Automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management User sessions are registered with logind via the pam_systemd(8) PAM module. See logind.conf(5) for information about the configuration of this service. See sd-login(3) for information about the basic concepts of logind such as users, sessions and seats. See the logind D-Bus API Documentation[1] for information about the APIs systemd-logind provides. For more information on the inhibition logic see the Inhibitor Lock Developer Documentation[2]. SEE ALSO
systemd(1), systemd-user-sessions.service(8), loginctl(1), logind.conf(5), pam_systemd(8) sd-login(3) NOTES
1. logind D-Bus API Documentation https://www.freedesktop.org/wiki/Software/systemd/logind 2. Inhibitor Lock Developer Documentation https://www.freedesktop.org/wiki/Software/systemd/inhibit systemd 237 SYSTEMD-LOGIND.SERVICE(8)
All times are GMT -4. The time now is 09:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy