aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/tar.c37
-rw-r--r--tar.c37
2 files changed, 0 insertions, 74 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 46321de60..ef611531a 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -149,43 +149,6 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
149 char** excludeList); 149 char** excludeList);
150#endif 150#endif
151 151
152#ifdef BB_FEATURE_TAR_GZIP
153/* Signal handler for when child gzip process dies... */
154static void child_died()
155{
156 fflush(stdout);
157 fflush(stderr);
158 exit(EXIT_FAILURE);
159}
160
161extern int tar_unzip_init(int tarFd)
162{
163 int child_pid;
164 static int unzip_pipe[2];
165 /* Cope if child dies... Otherwise we block forever in read()... */
166 signal(SIGCHLD, child_died);
167
168 if (pipe(unzip_pipe)!=0)
169 error_msg_and_die("pipe error");
170
171 if ( (child_pid = fork()) == -1)
172 error_msg_and_die("fork failure");
173
174 if (child_pid==0) {
175 /* child process */
176 close(unzip_pipe[0]);
177// gunzip_init();
178 unzip(tarFd, unzip_pipe[1]);
179 exit(EXIT_SUCCESS);
180 }
181 else {
182 /* return fd of uncompressed data to parent process */
183 close(unzip_pipe[1]);
184 return(unzip_pipe[0]);
185 }
186}
187#endif
188
189#if defined BB_FEATURE_TAR_EXCLUDE 152#if defined BB_FEATURE_TAR_EXCLUDE
190static struct option longopts[] = { 153static struct option longopts[] = {
191 { "exclude", 1, NULL, 'e' }, 154 { "exclude", 1, NULL, 'e' },
diff --git a/tar.c b/tar.c
index 46321de60..ef611531a 100644
--- a/tar.c
+++ b/tar.c
@@ -149,43 +149,6 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
149 char** excludeList); 149 char** excludeList);
150#endif 150#endif
151 151
152#ifdef BB_FEATURE_TAR_GZIP
153/* Signal handler for when child gzip process dies... */
154static void child_died()
155{
156 fflush(stdout);
157 fflush(stderr);
158 exit(EXIT_FAILURE);
159}
160
161extern int tar_unzip_init(int tarFd)
162{
163 int child_pid;
164 static int unzip_pipe[2];
165 /* Cope if child dies... Otherwise we block forever in read()... */
166 signal(SIGCHLD, child_died);
167
168 if (pipe(unzip_pipe)!=0)
169 error_msg_and_die("pipe error");
170
171 if ( (child_pid = fork()) == -1)
172 error_msg_and_die("fork failure");
173
174 if (child_pid==0) {
175 /* child process */
176 close(unzip_pipe[0]);
177// gunzip_init();
178 unzip(tarFd, unzip_pipe[1]);
179 exit(EXIT_SUCCESS);
180 }
181 else {
182 /* return fd of uncompressed data to parent process */
183 close(unzip_pipe[1]);
184 return(unzip_pipe[0]);
185 }
186}
187#endif
188
189#if defined BB_FEATURE_TAR_EXCLUDE 152#if defined BB_FEATURE_TAR_EXCLUDE
190static struct option longopts[] = { 153static struct option longopts[] = {
191 { "exclude", 1, NULL, 'e' }, 154 { "exclude", 1, NULL, 'e' },