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]

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


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