Thread: Question about endless process creation

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    178

    Question about endless process creation

    I understand processes, forking, execing, etc. but I am having difficulty with forking a child in an endless loop, i.e. parent is endless and forks inifinite children not utilizing waitpid or sleep. But I am not sure how this can be accomplished.

    I manage to fork one child, it exec'd fine but then both parent and child died.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Good. The only reason one might want to fork an infinite (or very large, almost without limitations) number of processes is a denial of service attack.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    178
    My purpose is not denial-of-service. I want to understand process creation better and I do not as of yet understand the process of forking a child and having the parent continue to process data, then fork another child.

    This is for a school project.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Capturing stderr from an execv()ed process
    By Angus in forum Linux Programming
    Replies: 1
    Last Post: 11-10-2009, 01:43 PM
  2. Stopping Processes Question
    By brett in forum Linux Programming
    Replies: 3
    Last Post: 06-24-2007, 10:15 PM
  3. Process sending file descriptors to another process
    By Yasir_Malik in forum C Programming
    Replies: 4
    Last Post: 04-07-2005, 07:36 PM
  4. Almost finished with Round Robin algorithm
    By Shinobi-wan in forum C++ Programming
    Replies: 2
    Last Post: 12-19-2004, 03:00 PM
  5. Hi all!, Another question, About NT Process
    By Pandora in forum Windows Programming
    Replies: 4
    Last Post: 03-20-2003, 12:24 AM