I'm using kfcgi with httpd on OpenBSD 6.0. It seems I can't get anything to spawn a worker that utilizes a shared library. I'm using a daemonized CGI program following the tutorial here: https://kristaps.bsd.lv/kcgi/tutorial2.html
I have two files: main.cpp and test.cpp. main.cpp is completely unchanged from the tutorial listed above (hence, absolutely no shared library code is executed [found out from debugging.]) test.cpp references shared libraries: kcgi (w/ zlib), scrypt, and sqlite3. Everything compiles fine -- that's not the problem. When I spawn the kcgi program, the following happens: # kfcgi -n 1 -v -d -U www -u www -- /cgi-bin/cgimg kfcgi[66849]: worker unexpectedly exited # The above error is referenced on line 425 of kfcgi.c: https://github.com/kristapsdz/kcgi/blob/master/kfcgi.c It appears "the worker has exited abnormally," however there is no code to indicate such. The tutorial program works completely fine without a shared library linked with it; however, if a shared library is linked with it, the worker instantly dies. I doubt this is the issue, but for brevity, here is the compilation instructions I have performed: g++ -I/usr/local/include -c -o test.o test.cpp g++ -I/usr/local/include -c -o main.o main.cpp g++ -I/usr/local/include -L/usr/local/lib -lscrypt -lsqlite3 main.o test.o -lkcgi -lz -o cgitest Please let me know if there is any more information I can add which would be helpful in regards to communicating the issue I'm facing. Thanks, Austin Bentley University of Missouri Science and Technology (Formerly UM-Rolla)