views:

47

answers:

1

I've not been successful in finding help with this issue. What I want to do is following: I have some C-based executables that implement the server side logic. There should be one process running this executable per client. The process should be invoked upon the first HTTP request form the client and killed once a specific HTTP request comes in later on.

So here's the question. How can I start a new process from a FCGI program based on HTTP request internals, run my C-executable in that process and later kill the process from the same FCGI program? Effectively the serving C application processes then run in the background.

A: 

if you download the devkit from fastcgi.com it contains an example for threaded server that uses the libfcgi functions to pick apart the headers in the worker threads.

should give you a good starting point for managing your executable instance(s).

chaosless