Help! Realtime: simple C language, using fork() 
Author Message
 Help! Realtime: simple C language, using fork()

Hi,

under Unix, coded in C language. Using fork to create child.

how to prove that the parent and child are running concurrently?

if share file pointer, and print the file. but the child, why always
keep the cpu until it finish the task and then just pass the cpu to
parent or vice versa, although i have use sleep() ??

Please help me. Thank you.



Fri, 18 Jul 2003 22:46:30 GMT  
 Help! Realtime: simple C language, using fork()


Quote:
>under Unix, coded in C language. Using fork to create child.

There is no fork function in ISO C. Why ask here?

Quote:
>how to prove that the parent and child are running concurrently?

Concurrency is outside the scope of ISO C.

Quote:
>Please help me. Thank you.




Fri, 18 Jul 2003 23:06:31 GMT  
 Help! Realtime: simple C language, using fork()


Quote:
> Hi,

> under Unix, coded in C language. Using fork to create child.

> how to prove that the parent and child are running concurrently?

> if share file pointer, and print the file. but the child, why always
> keep the cpu until it finish the task and then just pass the cpu to
> parent or vice versa, although i have use sleep() ??


--
C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
 "The C-FAQ Book" ISBN 0-201-84519-9
C.A.P. FAQ: ftp://cap.connx.com/pub/Chess%20Analysis%20Project%20FAQ.htm


Sat, 19 Jul 2003 02:55:56 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. C as 2nd CS language (was Re: Languages ...

2. HELP using fork() - anyone got any examples....

3. SURVEY of CS depts. (languages)

4. C as First Language for CS

5. [Help : using fork() system call

6. Programming Language for Undergrad Intro CS Course?

7. Using COM/DCOM in a Realtime System?

8. Newbie: separate big .cs file into small .cs files

9. Need some help with accessing data from a microphone in realtime

10. HELP ! - RTL Languages - Using RightToLeft Property

11. Compile CS source code using ICodeCompiler

12. Two CS files (using namespaces)

 

 
Powered by phpBB® Forum Software