• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/apr-30/apr/apr/threadproc/netware/

Lines Matching refs:attr

59 APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
77 if ((rv = apr_file_pipe_create_ex(&attr->child_in, &attr->parent_in,
78 in, attr->pool)) == APR_SUCCESS)
79 rv = apr_file_inherit_unset(attr->parent_in);
84 attr->child_in = &no_file;
87 if ((rv = apr_file_pipe_create_ex(&attr->parent_out, &attr->child_out,
88 out, attr->pool)) == APR_SUCCESS)
89 rv = apr_file_inherit_unset(attr->parent_out);
94 attr->child_out = &no_file;
97 if ((rv = apr_file_pipe_create_ex(&attr->parent_err, &attr->child_err,
98 err, attr->pool)) == APR_SUCCESS)
99 rv = apr_file_inherit_unset(attr->parent_err);
104 attr->child_err = &no_file;
110 APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
115 if (attr->child_in == NULL && attr->parent_in == NULL
117 if ((rv = apr_file_pipe_create(&attr->child_in, &attr->parent_in,
118 attr->pool)) == APR_SUCCESS)
119 rv = apr_file_inherit_unset(attr->parent_in);
122 if (attr->child_in && (attr->child_in->filedes != -1))
123 rv = apr_file_dup2(attr->child_in, child_in, attr->pool);
125 attr->child_in = NULL;
126 if ((rv = apr_file_dup(&attr->child_in, child_in, attr->pool))
128 rv = apr_file_inherit_set(attr->child_in);
133 rv = apr_file_dup(&attr->parent_in, parent_in, attr->pool);
140 APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
145 if (attr->child_out == NULL && attr->parent_out == NULL
147 if ((rv = apr_file_pipe_create(&attr->parent_out, &attr->child_out,
148 attr->pool)) == APR_SUCCESS)
149 rv = apr_file_inherit_unset(attr->parent_out);
152 if (attr->child_out && (attr->child_out->filedes != -1))
153 rv = apr_file_dup2(attr->child_out, child_out, attr->pool);
155 attr->child_out = NULL;
156 if ((rv = apr_file_dup(&attr->child_out, child_out, attr->pool))
158 rv = apr_file_inherit_set(attr->child_out);
163 rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
170 APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
175 if (attr->child_err == NULL && attr->parent_err == NULL
177 if ((rv = apr_file_pipe_create(&attr->parent_err, &attr->child_err,
178 attr->pool)) == APR_SUCCESS)
179 rv = apr_file_inherit_unset(attr->parent_err);
182 if (attr->child_err && (attr->child_err->filedes != -1))
183 rv = apr_file_dup2(attr->child_err, child_err, attr->pool);
185 attr->child_err = NULL;
186 if ((rv = apr_file_dup(&attr->child_err, child_err, attr->pool))
188 rv = apr_file_inherit_set(attr->child_err);
193 rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
200 APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
203 return apr_filepath_merge(&attr->currdir, NULL, dir,
204 APR_FILEPATH_NATIVE, attr->pool);
207 APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
214 APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach)
216 attr->detached = detach;
243 static apr_status_t limit_proc(apr_procattr_t *attr)
247 if (attr->limit_cpu != NULL) {
248 if ((setrlimit(RLIMIT_CPU, attr->limit_cpu)) != 0) {
254 if (attr->limit_nproc != NULL) {
255 if ((setrlimit(RLIMIT_NPROC, attr->limit_nproc)) != 0) {
261 if (attr->limit_mem != NULL) {
262 if ((setrlimit(RLIMIT_AS, attr->limit_mem)) != 0) {
267 if (attr->limit_mem != NULL) {
268 if ((setrlimit(RLIMIT_DATA, attr->limit_mem)) != 0) {
273 if (attr->limit_mem != NULL) {
274 if ((setrlimit(RLIMIT_VMEM, attr->limit_mem)) != 0) {
288 APR_DECLARE(apr_status_t) apr_procattr_child_errfn_set(apr_procattr_t *attr,
295 APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr,
302 APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
305 attr->addrspace = addrspace;
313 apr_procattr_t *attr,
319 wire.infd = attr->child_in
320 ? (attr->child_in->filedes != -1 ? attr->child_in->filedes
323 wire.outfd = attr->child_out
324 ? (attr->child_out->filedes != -1 ? attr->child_out->filedes
327 wire.errfd = attr->child_err
328 ? (attr->child_err->filedes != -1 ? attr->child_err->filedes
332 newproc->in = attr->parent_in;
333 newproc->out = attr->parent_out;
334 newproc->err = attr->parent_err;
336 /* attr->detached and PROC_DETACHED do not mean the same thing. attr->detached means
339 addr_space = PROC_LOAD_SILENT | (attr->addrspace ? 0 : PROC_CURRENT_SPACE);
340 addr_space |= (attr->detached ? PROC_DETACHED : 0);
342 if (attr->currdir) {
346 if ((rv = apr_filepath_merge(&fullpath, attr->currdir, progname,
358 if (attr->child_in && (attr->child_in->filedes != -1)) {
359 apr_pool_cleanup_kill(apr_file_pool_get(attr->child_in),
360 attr->child_in, apr_unix_file_cleanup);
361 apr_file_close(attr->child_in);
363 if (attr->child_out && (attr->child_out->filedes != -1)) {
364 apr_pool_cleanup_kill(apr_file_pool_get(attr->child_out),
365 attr->child_out, apr_unix_file_cleanup);
366 apr_file_close(attr->child_out);
368 if (attr->child_err && (attr->child_err->filedes != -1)) {
369 apr_pool_cleanup_kill(apr_file_pool_get(attr->child_err),
370 attr->child_err, apr_unix_file_cleanup);
371 apr_file_close(attr->child_err);
452 APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
459 attr->limit_cpu = limit;
467 attr->limit_mem = limit;
475 attr->limit_nproc = limit;
483 attr->limit_nofile = limit;
494 APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
502 APR_DECLARE(apr_status_t) apr_procattr_group_set(apr_procattr_t *attr,