libfcgi

What's the best way to find out if a given process has been started started as fcgi?

I have an libfcgi program. It would be nice if it could detect if it has been started under FCGI (in which case it could go to the FCGI_Accept runloop) or if it's been started at the command line (in which case it could do something else). Is there an environment variable I can check for? I know I could set these in the webserver, but ...