Michael, forgive me if I am wrong - I am not a Unix buff - but I was under
the impression that forking was a method for creating multithreaded unix
apps?!? Everytime you fork() you end up with two seperate processes running
concurrently. You differentiate between them by chacking the result given by
fork(). Certainly under Cygwin this works. I also have some code written
using POSIX calls on BeOS that creates a daemon by forking 3 times.

Matt


> I want to use fork to make multithread application for sockets and I would
> like to fork it to run in dameon mode.

Multithread is not possible with Fork()

> Can I fork the forked program? With call fork I get 0 in result in child.

This is correct. Fork returns 0 in the child and returns the child process
ID in the parent.

Michael.




_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to