This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

OT: Re: help with C(I know that have many c master here)


Hi Luiz,

Are you looking for the soultion for your school assignment??

Anyway, what you need is fork(2), sleep(3), kill(2).

Something like:

pid = fork();

if (pid == 0)
{
  /* child */
}
else
{
  /* parent */
  sleep(30);
  kill(pid, )
}

Rayson




__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]