rpcss skeleton - fork and shell32
gmturner007 at ameritech.net
Sat Nov 9 21:38:26 CST 2002
On Saturday 09 November 2002 08:33 pm, Steven Edwards wrote:
> >+void RPCSS_Spork()
> >+ /* Because we are a wine app, we can't fork. This is
> >+ a trick to invoke ourselves, so we can provide a
> >+ similar effect of creating a "background" process */
> I was wondering about this but have been busy with other things. In
> shelllink.c we call fork and waitpid for shell32. Shouldnt
> this code be removed and reimplemented like in rpcss? When I am
> trying to build shell32 under windows I still get this
> shelllink.o(.text+0x4161):shelllink.c: undefined reference to `fork'
> shelllink.o(.text+0x43fa):shelllink.c: undefined reference to
> Can someone give a example of how to work around waitpid and maybe I
> can adapt Gregs Spork code.
I think what you are looking for is here:
beware, however, that the "Spork" function and fork() are more-or-less
completely different. That spork code is just a cheap-and-dirty way to
invoke yourself. This means that:
o spork only returns once
o the child process doesn't inherit state from the parent process
o it will only work for processes for which you control the source;
dll's can't do it this way.
I think, long ago, I saw seen some clever folks attempt to implement
fork() like behavior for windows; if you need the "real deal," you
might be able to find this with some googling, or maybe cygwin has
ideas you could borrow.
Do you frequently think "there ought to be a law..."?
Afraid that people you /don't like/ have too much FREEDOM?
Concerned about the unequal powers of the EVIL RICH?
Think the government could solve your neighbor's problems?
You aren't the first.
More information about the wine-devel