CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Location
    cache software
    Posts
    106

    Arrow fork. child creation

    how do i create n processes (p1..p2.....pn) but p1 is father of p2, p2 is father of p3 .. and so on ? is it possible ?
    Last edited by rantech; November 16th, 2005 at 03:31 PM.
    __________________________________
    s.m.a.r.t+s.m.a.r.t = ?

  2. #2
    Join Date
    Feb 2005
    Location
    Pasadena, MD, USA
    Posts
    105

    Re: fork. child creation

    Hi Rantech,

    http://www.kohala.com/start/apue.html has samples on fork/exec. See Chapter 8 examples, 'Process Control'. If pid == 0, you're in the child. Simply do it recursively.

    I crashed a Solaris server at Maryland when one got away from me... I was especially impressed with one of my instructors - he performed the crash dump analysis and knew it was me .

    Jeff
    Last edited by [email protected]; November 16th, 2005 at 07:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured