Calling exec returns errno 14 (bad address) with absolute path
问题 in making a simple cgi server for a course. To do that in some point I have to make a fork/exec to launch the cgi handler, the problem is that the exec keep returning errno 14. I've tried the following code in a standalone version an it works with and without the absolute path. Here's the code: static void _process_cgi(int fd, http_context_t* ctx) { pid_t childProcess; int ret; char returnValue[1024]; log(LOG, "calling cgi", &ctx->uri[1], 0); if((childProcess = fork()) != 0) { /// /// Set the