Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, All, I'am Eric. I'am new to linux programming and has found that few issues hard to solve for me. Is there any way to schedule creating and terminating child ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3

    Question Schedule creating and terminating processes

    Hi, All, I'am Eric.

    I'am new to linux programming and has found that few issues hard to solve for me.

    Is there any way to schedule creating and terminating child processes ?

    For instance, I will create child processes from parent on which has elapsed say 30 seconds.

    Also, to control the child processes will terminated after 60 seconds.


    It will written with c.

    Thanks,

    -- Eric

  2. #2
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    try to put your process in crond

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3
    I'am sorry. May be this will not work for me.
    I need to control the life of any child processes created by me.
    Searching for some function like timer if it is available on linux system.

    Trying something like:

    PHP Code:
    int parentstartproc time();
    int childproctobestart 60// 60 sec after parent process started.

    while (1)
    {
        if (
    time() > (parentstartproc childprotobestart)
        {
             
    /// do fork ();
             
    break;
        }


  4. #4
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    Use select() as a timer in user space

  5. #5
    Just Joined!
    Join Date
    Mar 2009
    Posts
    3
    Jeffrey, thank, I'am checking it now.

    Also, besides kernel.org. Any web sites or books good for beginners to learn syscall ? Thanks !

Posting Permissions

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