Lines Matching defs:req
413 cgid_req_t *req)
424 stat = sock_read(fd, req, sizeof(*req));
428 r->server->log.level = req->loglevel;
429 if (req->req_type == GETPID_REQ) {
440 ap_set_module_config(r->request_config, &cgid_module, (void *)&req->ugid);
443 r->filename = apr_pcalloc(r->pool, req->filename_len + 1);
444 *argv0 = apr_pcalloc(r->pool, req->argv0_len + 1);
445 r->uri = apr_pcalloc(r->pool, req->uri_len + 1);
446 if ((stat = sock_read(fd, r->filename, req->filename_len)) != APR_SUCCESS ||
447 (stat = sock_read(fd, *argv0, req->argv0_len)) != APR_SUCCESS ||
448 (stat = sock_read(fd, r->uri, req->uri_len)) != APR_SUCCESS) {
452 r->args = apr_pcalloc(r->pool, req->args_len + 1); /* empty string if no args */
453 if (req->args_len) {
454 if ((stat = sock_read(fd, r->args, req->args_len)) != APR_SUCCESS) {
460 environ = apr_pcalloc(r->pool, (req->env_count + 2) *sizeof(char *));
461 for (i = 0; i < req->env_count; i++) {
475 if ((stat = sock_read(fd, &(req->limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS)
486 cgid_req_t req = {0};
493 req.ugid = empty_ugid;
495 memcpy(&req.ugid, ugid, sizeof(ap_unix_identity_t));
498 req.req_type = req_type;
499 req.ppid = parent_pid;
500 req.conn_id = r->connection->id;
501 for (req.env_count = 0; env[req.env_count]; req.env_count++) {
504 req.filename_len = strlen(r->filename);
505 req.argv0_len = strlen(argv0);
506 req.uri_len = strlen(r->uri);
507 req.args_len = r->args ? strlen(r->args) : 0;
508 req.loglevel = r->server->log.level;
511 if (req.args_len) {
513 &req, sizeof(req),
514 r->filename, req.filename_len,
515 argv0, req.argv0_len,
516 r->uri, req.uri_len,
517 r->args, req.args_len);
520 &req, sizeof(req),
521 r->filename, req.filename_len,
522 argv0, req.argv0_len,
523 r->uri, req.uri_len);
531 for (i = 0; i < req.env_count; i++) {
541 req.limits.limit_cpu = *(core_conf->limit_cpu);
542 req.limits.limit_cpu_set = 1;
545 req.limits.limit_cpu_set = 0;
551 req.limits.limit_mem = *(core_conf->limit_mem);
552 req.limits.limit_mem_set = 1;
555 req.limits.limit_mem_set = 0;
562 req.limits.limit_nproc = *(core_conf->limit_nproc);
563 req.limits.limit_nproc_set = 1;
566 req.limits.limit_nproc_set = 0;
571 if ( (stat = sock_write(fd, &(req.limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS)
1357 cgid_req_t req = {0};
1368 req.req_type = GETPID_REQ;
1369 req.ppid = parent_pid;
1370 req.conn_id = info->r->connection->id;
1372 stat = sock_write(sd, &req, sizeof(req));