MCPcopy Create free account
hub / github.com/apache/httpd / discard_script_output

Function discard_script_output

modules/generators/cgi_common.h:47–62  ·  view source on GitHub ↗

Read and discard all output from the brigade. Note that with the * CGI bucket, the brigade will become empty once the script's stdout * is closed (or on error/timeout), but the stderr output may not have * been entirely captured at this point. */

Source from the content-addressed store, hash-verified

45 * is closed (or on error/timeout), but the stderr output may not have
46 * been entirely captured at this point. */
47static void discard_script_output(apr_bucket_brigade *bb)
48{
49 apr_bucket *e;
50 const char *buf;
51 apr_size_t len;
52
53 for (e = APR_BRIGADE_FIRST(bb);
54 e != APR_BRIGADE_SENTINEL(bb) && !APR_BUCKET_IS_EOS(e);
55 e = APR_BRIGADE_FIRST(bb))
56 {
57 if (apr_bucket_read(e, &buf, &len, APR_BLOCK_READ)) {
58 break;
59 }
60 apr_bucket_delete(e);
61 }
62}
63
64static int log_scripterror(request_rec *r, cgi_server_conf *conf, int ret,
65 apr_status_t rv, const char *logno,

Callers 3

cgi_handle_responseFunction · 0.85
log_scriptFunction · 0.85
log_scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected