Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
起動時に大量のデータをロードして処理するFastCGIアプリケーションがあります。また、入力データパスを決定するために環境変数を取得する必要がありますが、これまでのところ理解している限り、環境ポインターenvpには要求が付属しています。
最初のリクエストの前、たとえばFCGX_Init()の直後にgetenvを実行したいと思います。出来ますか?
ええ、結局のところ、-initial-envに対応するlighttpdは、lighttpd.confのfastcgi.serverセクションにある「bin-environment」配列です。そこで定義された値は、実行の最初からgetenv()にアクセスできます。