summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dpkg/file.c2
-rw-r--r--lib/dpkg/subproc.c9
-rw-r--r--lib/dpkg/subproc.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/dpkg/file.c b/lib/dpkg/file.c
index b35be0121..cff224985 100644
--- a/lib/dpkg/file.c
+++ b/lib/dpkg/file.c
@@ -173,5 +173,5 @@ file_show(const char *filename)
command_add_arg(&cmd, filename);
command_exec(&cmd);
}
- subproc_wait(pid, _("showing file on pager"));
+ subproc_wait_check(pid, _("showing file on pager"), PROCNOCHECK);
}
diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index f07a378c5..cad968105 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -157,9 +157,14 @@ subproc_wait(pid_t pid, const char *desc)
int
subproc_wait_check(pid_t pid, const char *desc, int flags)
{
- int status;
+ int status, rc;
status = subproc_wait(pid, desc);
- return subproc_check(status, desc, flags);
+ if (flags & PROCNOCHECK)
+ rc = status;
+ else
+ rc = subproc_check(status, desc, flags);
+
+ return rc;
}
diff --git a/lib/dpkg/subproc.h b/lib/dpkg/subproc.h
index e381d3f3d..f4dd7d56f 100644
--- a/lib/dpkg/subproc.h
+++ b/lib/dpkg/subproc.h
@@ -39,6 +39,7 @@ void subproc_signals_cleanup(int argc, void **argv);
#define PROCPIPE 1
#define PROCWARN 2
#define PROCNOERR 4
+#define PROCNOCHECK 8
pid_t subproc_fork(void);
int subproc_wait(pid_t pid, const char *desc);