Re: fork ???

> > So I am happy if anyone could share a peice of code that explains how to
> > do this in a easy way !!! If you need more info please contact me

Here is a self-deemed "trivial example":

Have you thought about using threads?  This may not be what you want 
since you are looking at exec+fork, but they are certainly 
lightweight, and in my (limited) experience they are quite portable 
if you use a standard API, like POSIX threads.

For documentation, a good starting point is the glibc distribution.  
If you have a Red Hat-like system, read "/usr/doc/glibc-<version>
/README.threads" and check out the examples in "/usr/doc/glibc-<versi

There are even more thread tutorials out on the web than for fork(). 
 I found the following publication useful:

Credit to Prof. Wagner, now of U. of Maine.

Good luck.


Sourav Mandal

Sourav K. Mandal

Massachusetts Institute of Technology
Department of Physics

"In enforcing a truth we need severity rather than
efflorescence of language. We must be simple, 
precise, terse."

                      -- Edgar Allan Poe, 
                        "The Poetic Principle"

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]