Lines Matching refs:child
199 static void free_child PARAMS ((struct child *));
200 static void start_job_command PARAMS ((struct child *child));
202 static int job_next_command PARAMS ((struct child *));
203 static int start_waiting_job PARAMS ((struct child *));
207 struct child *children = 0;
219 static struct child *waiting_jobs = 0;
475 register struct child *lastc, *c; in reap_children()
844 free_child (struct child *child) in free_child() argument
848 child, child->file->name); in free_child()
865 child, child->file->name)); in free_child()
873 if (child->command_lines != 0) in free_child()
876 for (i = 0; i < child->file->cmds->ncommand_lines; ++i) in free_child()
877 free (child->command_lines[i]); in free_child()
878 free ((char *) child->command_lines); in free_child()
881 if (child->environment != 0) in free_child()
883 register char **ep = child->environment; in free_child()
886 free ((char *) child->environment); in free_child()
889 free ((char *) child); in free_child()
967 start_job_command (struct child *child) in start_job_command() argument
981 if (!child->command_ptr) in start_job_command()
986 flags = (child->file->command_flags in start_job_command()
987 | child->file->cmds->lines_flags[child->command_line - 1]); in start_job_command()
989 p = child->command_ptr; in start_job_command()
990 child->noerror = ((flags & COMMANDS_NOERROR) != 0); in start_job_command()
999 child->noerror = 1; in start_job_command()
1011 child->file->cmds->lines_flags[child->command_line - 1] in start_job_command()
1021 argv = construct_command_argv (p, &end, child->file, &child->sh_batch_file); in start_job_command()
1024 child->command_ptr = NULL; in start_job_command()
1028 child->command_ptr = end; in start_job_command()
1042 child->file->update_status = 1; in start_job_command()
1043 notice_finished_file (child->file); in start_job_command()
1068 if (job_next_command (child)) in start_job_command()
1069 start_job_command (child); in start_job_command()
1074 set_command_state (child->file, cs_running); in start_job_command()
1075 child->file->update_status = 0; in start_job_command()
1076 notice_finished_file (child->file); in start_job_command()
1167 child->good_stdin = !good_stdin_used; in start_job_command()
1168 if (child->good_stdin) in start_job_command()
1173 child->deleted = 0; in start_job_command()
1177 if (child->environment == 0) in start_job_command()
1178 child->environment = target_environment (child->file); in start_job_command()
1185 if (child->remote) in start_job_command()
1188 if (start_remote_job (argv, child->environment, in start_job_command()
1189 child->good_stdin ? 0 : bad_stdin, in start_job_command()
1196 if (child->good_stdin && !used_stdin) in start_job_command()
1198 child->good_stdin = 0; in start_job_command()
1201 child->remote = is_remote; in start_job_command()
1202 child->pid = id; in start_job_command()
1215 child->remote = 0; in start_job_command()
1218 if (!child_execute_job (argv, child)) { in start_job_command()
1240 child->pid = child_execute_job (child->good_stdin ? 0 : bad_stdin, 1, in start_job_command()
1241 argv, child->environment); in start_job_command()
1242 if (child->pid < 0) in start_job_command()
1261 child->pid = vfork (); in start_job_command()
1263 if (child->pid == 0) in start_job_command()
1278 child_execute_job (child->good_stdin ? 0 : bad_stdin, 1, in start_job_command()
1279 argv, child->environment); in start_job_command()
1281 else if (child->pid < 0) in start_job_command()
1311 environ = child->environment; in start_job_command()
1330 proc_return = spawnvpe (P_WAIT, argv[0], argv, child->environment); in start_job_command()
1346 child->pid = dos_pid++; in start_job_command()
1353 child->pid = amiga_pid++; in start_job_command()
1375 hPID = process_easy(argv, child->environment); in start_job_command()
1378 child->pid = (intptr_t) hPID; in start_job_command()
1400 set_command_state (child->file, cs_running); in start_job_command()
1411 child->file->update_status = 2; in start_job_command()
1412 notice_finished_file (child->file); in start_job_command()
1421 start_waiting_job (struct child *c) in start_waiting_job()
1488 register struct child *c; in new_job()
1607 c = (struct child *) xmalloc (sizeof (struct child)); in new_job()
1608 bzero ((char *)c, sizeof (struct child)); in new_job()
1743 job_next_command (struct child *child) in job_next_command() argument
1745 while (child->command_ptr == 0 || *child->command_ptr == '\0') in job_next_command()
1748 if (child->command_line == child->file->cmds->ncommand_lines) in job_next_command()
1751 child->command_ptr = 0; in job_next_command()
1756 child->command_ptr = child->command_lines[child->command_line++]; in job_next_command()
1870 struct child *job; in start_waiting_jobs()