from what I understand you set handler() function in a module to do the job.
and one more thing if I don't specify bin-path config option in lighttpd config then I have to start this handler-script separately with some options (and this is what they call in lighty docs runnging fcgi as external-fcgi-server), right ?