Lines Matching refs:action

44 	} action;
100 struct _file_action *action = &actions->actions[i];
102 if (action->type == file_action_open)
103 free(action->action.open_action.path);
104 else if (action->type == file_action_chdir)
105 free(action->action.chdir_action.path);
135 struct _file_action *action = &actions->actions[actions->count];
136 action->type = file_action_open;
137 action->fd = fildes;
138 action->action.open_action.path = npath;
139 action->action.open_action.oflag = oflag;
140 action->action.open_action.mode = mode;
163 struct _file_action *action = &actions->actions[actions->count];
164 action->type = file_action_close;
165 action->fd = fildes;
188 struct _file_action *action = &actions->actions[actions->count];
189 action->type = file_action_dup2;
190 action->fd = newfildes;
191 action->action.dup2_action.srcfd = fildes;
215 struct _file_action *action = &actions->actions[actions->count];
216 action->type = file_action_chdir;
217 action->fd = -1;
218 action->action.chdir_action.path = npath;
241 struct _file_action *action = &actions->actions[actions->count];
242 action->type = file_action_fchdir;
243 action->fd = fildes;
412 struct sigaction action;
413 action.sa_handler = SIG_DFL;
414 action.sa_flags = 0;
415 action.sa_userdata = NULL;
416 sigemptyset(&action.sa_mask);
419 && sigaction(i, &action, NULL) != 0) {
457 struct _file_action *action = &actions->actions[i];
459 if (action->fd == *errfd) {
460 int newfd = dup(action->fd);
463 close(action->fd);
468 if (action->type == file_action_close) {
469 if (close(action->fd) != 0)
471 } else if (action->type == file_action_open) {
472 int fd = open(action->action.open_action.path,
473 action->action.open_action.oflag,
474 action->action.open_action.mode);
477 if (fd != action->fd) {
478 if (dup2(fd, action->fd) == -1)
483 } else if (action->type == file_action_dup2) {
484 if (dup2(action->action.dup2_action.srcfd, action->fd) == -1)
486 } else if (action->type == file_action_chdir) {
487 if (chdir(action->action.chdir_action.path) == -1)
489 } else if (action->type == file_action_fchdir) {
490 if (fchdir(action->fd) == -1)