Re: How to spawn a fastcgi process in windows natively?
"Jason P Sage" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | Jegas |
| Message-ID | <000b01c6d378$be676060$0201a8c0@dev01> |
Right in the bottom of your sign off you have "Feel the power of open source" and "Feel the power of "Free Pascal". Sounds like you may already have the tools you need! Free Pascal kicks butt - and on Win32 the TThread class is purported to work the same way on Linux and Win32 platforms. Additionally, (look on http://www.lazarus.freepascal.org <http://www.lazarus.freepascal.org/> ) for a direct APACHE Module header translation - allowing DIRECT (to apache anyways) access to the apache API. I have also heard of Fast CGI Free Pascal implementations. I have not delved in this arena my self yet - but there may be something for you right there :-) Additionally, for portability reasons - and the fact that I don't expect 100 simultaneous requests per second or anything - have adopted a CGI thin Client Client/server architecture - that basically is a very lean 30k on win32 compressed exe, 50-100k for various implementations (uncompressed) binary CGI executables - that get all the CGI info, and using a form of interprocess communication, I pass the info to a "server" or Daemon - that handles the processing, and then it uses IPC to hand the info back to the CGI thin client, which in turn sends out the results, and terminates. I've done all that in Free Pascal. Feel The Power? Of Free Pascal? Oh yeah ;) Have a great Day all! Jason P Sage -----Original Message----- To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org Subject: [FASTCGI] How to spawn a fastcgi process in windows natively? Hello, We're making a small http server which has fastcgi support (mainly for php for now). I've made a FastCGI "spawner" function which works in unix with fork/dup/socketstuff. The problem I have now is that I can't figure out how to do this in windows? I need a native (winapi, no cygwin or such) solution. I've found out CreateProcess which can send environment variables and inherit handles to the "child" in windows, but it can't continue to execute my code (so I can't start to listen for UDP on handle 0) The only way I come to think of is to first make a "helper" program which will act as a "child". Then from our server execute the program which will do the Listen stuff, and then CreateProcess into PHP or whatever. This is however troublesome to watch from the server (eg: the status of the final "child") How can I directly (eg: right from the server) spawn a fcgi process? Thanks, Ales Katona -- Feel the power of Opensource. Feel the power of Free Pascal. ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/