Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6066009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:27:18+00:00 2026-05-23T09:27:18+00:00

Is the new parent always init or is there some way to control who

  • 0

Is the new parent always “init” or is there some way to control who gets to be the new parent?

Wikipedia seems indicates that it’s always “init”. I really hope that this is not the case. I have tried everything I can think of with setpgid and setsid, but no luck. And now that I see this wikipedia article I need advice.

In a Unix-like operating system any
orphaned process will be immediately
adopted by the special init system
process. This operation is called
re-parenting and occurs automatically.
Even though technically the process
has the “init” process as its parent,
it is still called an orphan process
since the process that originally
created it no longer exists.
Taken from wikipedia

The reason I’m asking is because I’m making a Mac app that runs a number of worker processes. I want these worker processes to appear as children of the main process in the process-hierarchy of the task manager. Some of the workers run as different users and on Mac OS X I need to fork twice to pass privileges to the child process. Because I “double fork” the workers currently run as deamons, and when looking with task manager I see the workers are having “init” as their parent process.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:27:18+00:00Added an answer on May 23, 2026 at 9:27 am

    Orphaned children are always adopted by init. There is no Unix way of changing the parent to some non-init process.


    As of Linux 3.4 this is no longer strictly true. There’s still no portable Unix way of doing this but as Andy Lutomirski points out Linux 3.4 adds PR_SET_CHILD_SUBREAPER for prctl.

    In effect, a subreaper fulfills the role of init(1) for its
    descendant processes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New Question I am looking for a way in Javascript to get the parent
I've some probleme with merge. My update method works in this way: void update(Parent
I always thought base.Something was equivalent to ((Parent)this).Something , but apparently that's not the
Typical problem - I am trying to save new parent object with nested new
New to FluentNHibernate =D I have a parent/children classes as follows: public class Parent
I am using iframe to open new .aspx page from parent page. child page
I have 2 parent divs (old & new), if I click the Click to
I have a nested form Parent, which accepts attribute for Child. In my controller#new,
I am trying to do this: List<Parent> test = new List<Child>(); The complete code
I'm new to OpenGL and graphics programming in general, though I've always been interested

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.