This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

Re: A real fork() on NT


> What proof of concept?  The book has a "proof of concept".  It's the
> niggling details that are the problem.
>
> You'd need a real implementation to prove that it is workable.
>
> Why do I get the feeling that no one is interested in actually looking
> at the working code from the referenced book?
I've got the book; I have a DLL that exports a function called fork and I'm
seeing what can be done to get it to work with kdeinit. A lot of programs
do:
if (fork() == 0)
    exec(...)
and this could be replaced by spawn(...) anyway, but kdeinit does a bit more
work.
The major problem I've encountered so far is that handles which aren't
really NT objects aren't inherited by the child process. Also the child
process can't call any GUI services and so on.
The Cygwin DLL needs some modifications to support this, which I'm working
on at the moment. For example, any attempts to use the parent processes'
file handles in the child return an error of EBADF even though the Windows
file handles have been inherited properly.

Regards
Chris



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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