This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
help with C(I know that have many c master here)
- From: "Luiz Rafael Culik Guimaraes" <culikr at uol dot com dot br>
- To: <gcc at gcc dot gnu dot org>, <leaplist at lists dot leap-cf dot org>
- Date: Sun, 15 Sep 2002 11:55:29 -0300
- Subject: help with C(I know that have many c master here)
Dear Friends
I need to create an small c programa that should generate the follow exit
PROCESSO PAI: Meu PID=12345.
PROCESSO PAI: Vou criar processo filho.
PROCESSO PAI: Vou dormir durante 30 segundos...
PROCESSO FILHO: Já estou executando há 0 segundo(s).
PROCESSO FILHO: Já estou executando há 5 segundo(s).
PROCESSO FILHO: Já estou executando há 10 segundo(s).
PROCESSO FILHO: Já estou executando há 15 segundo(s).
PROCESSO FILHO: Já estou executando há 20 segundo(s).
PROCESSO FILHO: Já estou executando há 25 segundo(s).
PROCESSO PAI: Vou matar o processo filho PID=12346.
Here is what the program should do
It develops a program in C, the Linux, that a process creates son using the
primitive fork. After the creation of the son, the process father must sleep
during 30 seconds. The process son, to each 5 seconds, must present a
message in the screen. Passed the 30 seconds, the process father must kill
the process son and lock up its execution.
[]´s
Luiz Rafael Culik
http://sites.uol.com.br/culikr