+ if (ctl_data->header_done == 0) {
+ ctl_data->header_done = 1;
+ if(pipe(ctl_data->child_pipe) == -1) {
+ error(_("extract_list - error setting up pipe to extractor: %s\n"),
+ strerror(errno));
+ /*NOTREACHED*/
+ }
+
+ /* okay, ready to extract. fork a child to do the actual work */
+ if ((ctl_data->pid = fork()) == 0) {
+ /* this is the child process */
+ /* never gets out of this clause */
+ aclose(ctl_data->child_pipe[1]);
+ extract_files_child(ctl_data->child_pipe[0], ctl_data->elist);
+ /*NOTREACHED*/
+ }
+
+ if (ctl_data->pid == -1) {
+ errstr = newstralloc(errstr, _("writer_intermediary - error forking child"));
+ g_printf(_("writer_intermediary - error forking child"));
+ return;
+ }
+ aclose(ctl_data->child_pipe[0]);
+ }