Executing compiled CGI script in SHTML


New Member
Greetings to all,

I have compiled C code as CGI script and have two issues:

a) if I copy CGI script as user, it gives me segmentation fault (shell)/internal server error (web browser). However, when I put it as root and chown file to desired user, it works. After running strace as user, it breaks on set_thread_area() function in the very beginning of the execution, so I would presume this is some sort of security issue.
b) http://www.banelli.biz/cgi-bin/sys works, but when included in http://www.banelli.biz/cgi-test.shtml it returns [an error occurred while processing this directive]. Code beneath that message is:
<!--#exec cgi="/cgi-bin/sys" -->

When I, however, use

<!--#include virtual="/cgi-bin/sys" -->

it works fine. Is there any particular difference between these two (for example in using parameters) or is it just difference in Apache configuration?

Thanks in advance for all assistance.

With my best,