wsi->hdr_state = LCHS_HEADER;
/* add us to the pt list of active cgis */
- lwsl_notice("%s: adding cgi %p to list\n", __func__, wsi->cgi);
+ lwsl_debug("%s: adding cgi %p to list\n", __func__, wsi->cgi);
cgi->cgi_list = pt->cgi_list;
pt->cgi_list = cgi;
env_array[n++] = p;
p += snprintf(p, end - p, "%s=%s", mp_cgienv->name,
mp_cgienv->value);
- lwsl_notice(" Applying mount-specific cgi env '%s'\n",
- env_array[n - 1]);
+ lwsl_debug(" Applying mount-specific cgi env '%s'\n",
+ env_array[n - 1]);
p++;
mp_cgienv = mp_cgienv->next;
}
if (cgi->pid) {
/* we are the parent process */
wsi->context->count_cgi_spawned++;
- lwsl_notice("%s: cgi %p spawned PID %d\n", __func__, cgi, cgi->pid);
+ lwsl_debug("%s: cgi %p spawned PID %d\n", __func__, cgi, cgi->pid);
return 0;
}
case LCHS_SINGLE_0A:
m = wsi->hdr_state;
if (c == '\x0a') {
- lwsl_err("Content-Length: %ld\n", wsi->cgi->content_length);
+ lwsl_debug("Content-Length: %ld\n", wsi->cgi->content_length);
wsi->hdr_state = LHCS_PAYLOAD;
/* drop the \0xa ... finalize will add it if needed */
lws_finalize_http_header(wsi,
if (wsi->cgi->pid > 0) {
n = waitpid(wsi->cgi->pid, &status, WNOHANG);
if (n > 0) {
- lwsl_notice("%s: PID %d reaped\n", __func__,
+ lwsl_debug("%s: PID %d reaped\n", __func__,
wsi->cgi->pid);
goto handled;
}
/* kill the process group */
n = kill(-wsi->cgi->pid, SIGTERM);
- lwsl_notice("%s: SIGTERM child PID %d says %d (errno %d)\n", __func__,
+ lwsl_debug("%s: SIGTERM child PID %d says %d (errno %d)\n", __func__,
wsi->cgi->pid, n, errno);
if (n < 0) {
/*
while (n > 0) {
n = waitpid(-wsi->cgi->pid, &status, WNOHANG);
if (n > 0)
- lwsl_notice("%s: reaped PID %d\n", __func__, n);
+ lwsl_debug("%s: reaped PID %d\n", __func__, n);
if (n <= 0) {
n = waitpid(wsi->cgi->pid, &status, WNOHANG);
if (n > 0)
- lwsl_notice("%s: reaped PID %d\n", __func__, n);
+ lwsl_debug("%s: reaped PID %d\n", __func__, n);
}
}
}
n = waitpid(-1, &status, WNOHANG | WNOWAIT);
if (n <= 0)
continue;
- lwsl_notice("%s: observed PID %d terminated\n", __func__, n);
+ lwsl_debug("%s: observed PID %d terminated\n", __func__, n);
pcgi = &pt->cgi_list;
if (cgi->content_length > cgi->content_length_seen)
continue;
- if (cgi->content_length)
- lwsl_notice("%s: wsi %p: expected content length seen: %ld\n",
+ if (cgi->content_length) {
+ lwsl_debug("%s: wsi %p: expected content length seen: %ld\n",
__func__, cgi->wsi, cgi->content_length_seen);
+ }
/* reap it */
waitpid(n, &status, WNOHANG);
* and close him if he's not already closing
*/
if (n == cgi->pid) {
- lwsl_notice("%s: found PID %d on cgi list\n",
+ lwsl_debug("%s: found PID %d on cgi list\n",
__func__, n);
/* defeat kill() */
cgi->pid = 0;
}
/* if not found on the cgi list, as he's one of ours, reap */
if (!cgi) {
- lwsl_notice("%s: reading PID %d although no cgi match\n",
+ lwsl_debug("%s: reading PID %d although no cgi match\n",
__func__, n);
waitpid(n, &status, WNOHANG);
}
if (cgi->content_length > cgi->content_length_seen)
continue;
- if (cgi->content_length)
- lwsl_notice("%s: wsi %p: expected content length seen: %ld\n",
+ if (cgi->content_length) {
+ lwsl_debug("%s: wsi %p: expected content length seen: %ld\n",
__func__, cgi->wsi, cgi->content_length_seen);
+ }
/* reap it */
if (waitpid(cgi->pid, &status, WNOHANG) > 0) {
- lwsl_notice("%s: found PID %d on cgi list\n",
+ lwsl_debug("%s: found PID %d on cgi list\n",
__func__, cgi->pid);
/* defeat kill() */
cgi->pid = 0;