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 ...
- 03-16-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 3
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
- 03-18-2009 #2Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
try to put your process in crond
- 03-19-2009 #3Just 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;
}
}
- 03-19-2009 #4Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
Use select() as a timer in user space
- 03-20-2009 #5Just 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 !


Reply With Quote