+static void
+start_processing_data(
+ ctl_data_t *ctl_data)
+{
+ if (pipe(ctl_data->child_pipe) == -1) {
+ error(_("extract_list - error setting up pipe to extractor: %s\n"),
+ strerror(errno));
+ /*NOTREACHED*/
+ }
+
+ /* decrypt */
+ if (ctl_data->file.encrypted) {
+ char *argv[3];
+ int crypt_out;
+ int errfd = fileno(stderr);
+
+ g_debug("image is encrypted %s %s", ctl_data->file.clnt_encrypt, ctl_data->file.clnt_decrypt_opt);
+ argv[0] = ctl_data->file.clnt_encrypt;
+ argv[1] = ctl_data->file.clnt_decrypt_opt;
+ argv[2] = NULL;
+ pipespawnv(ctl_data->file.clnt_encrypt, STDOUT_PIPE, 0, &ctl_data->child_pipe[0], &crypt_out, &errfd, argv);
+ ctl_data->child_pipe[0] = crypt_out;
+ }
+
+ /* decompress */
+ if (ctl_data->file.compressed) {
+ char *argv[3];
+ int comp_out;
+ int errfd = fileno(stderr);
+ char *comp_prog;
+ char *comp_arg;
+
+ g_debug("image is compressed %s", ctl_data->file.clntcompprog);
+ if (strlen(ctl_data->file.clntcompprog) > 0) {
+ comp_prog = ctl_data->file.clntcompprog;
+ comp_arg = "-d";
+ } else {
+ comp_prog = UNCOMPRESS_PATH;
+ comp_arg = UNCOMPRESS_OPT;
+ }
+ argv[0] = comp_prog;
+ argv[1] = comp_arg;
+ argv[2] = NULL;
+ pipespawnv(comp_prog, STDOUT_PIPE, 0, &ctl_data->child_pipe[0], &comp_out, &errfd, argv);
+ ctl_data->child_pipe[0] = comp_out;
+ }
+
+ /* 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);
+ /*NOTREACHED*/
+ }
+
+ if (ctl_data->pid == -1) {
+ errstr = newstralloc(errstr, _("writer_intermediary - error forking child"));
+ g_printf(_("writer_intermediary - error forking child"));
+ return;