summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-09-10 15:37:18 +0200
committerGuillem Jover <guillem@debian.org>2014-10-06 00:48:13 +0200
commit59427cc7a4b5289168a3b6a9598fe2c0eb6bf475 (patch)
tree3aced6039d7985f6b7e7eda4eb7695cc737b7e8f /lib
parentf7be86add268ad27c99c86a55fb2ad12d2fc8da7 (diff)
downloaddpkg-59427cc7a4b5289168a3b6a9598fe2c0eb6bf475.tar.gz
libdpkg: Rename subproc_wait_check() to subproc_reap()
Diffstat (limited to 'lib')
-rw-r--r--lib/dpkg/compress.c2
-rw-r--r--lib/dpkg/file.c2
-rw-r--r--lib/dpkg/libdpkg.map2
-rw-r--r--lib/dpkg/subproc.c2
-rw-r--r--lib/dpkg/subproc.h2
-rw-r--r--lib/dpkg/test/t-command.c8
-rw-r--r--lib/dpkg/test/t-subproc.c12
7 files changed, 15 insertions, 15 deletions
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index a7f690263..e2c5109a9 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -81,7 +81,7 @@ fd_fd_filter(int fd_in, int fd_out, const char *desc, const char *delenv[],
command_exec(&cmd);
}
- subproc_wait_check(pid, desc, 0);
+ subproc_reap(pid, desc, 0);
}
#endif
diff --git a/lib/dpkg/file.c b/lib/dpkg/file.c
index cff224985..bf674a17b 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_check(pid, _("showing file on pager"), PROCNOCHECK);
+ subproc_reap(pid, _("showing file on pager"), PROCNOCHECK);
}
diff --git a/lib/dpkg/libdpkg.map b/lib/dpkg/libdpkg.map
index 2d15f1958..416ee80bb 100644
--- a/lib/dpkg/libdpkg.map
+++ b/lib/dpkg/libdpkg.map
@@ -134,7 +134,7 @@ LIBDPKG_PRIVATE {
subproc_signals_setup;
subproc_signals_cleanup;
subproc_fork;
- subproc_wait_check;
+ subproc_reap;
command_init;
command_add_arg;
diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index 363a0fa91..7f5eff8d3 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -155,7 +155,7 @@ subproc_wait(pid_t pid, const char *desc)
}
int
-subproc_wait_check(pid_t pid, const char *desc, int flags)
+subproc_reap(pid_t pid, const char *desc, int flags)
{
int status, rc;
diff --git a/lib/dpkg/subproc.h b/lib/dpkg/subproc.h
index a74eec913..f2d4513ac 100644
--- a/lib/dpkg/subproc.h
+++ b/lib/dpkg/subproc.h
@@ -42,7 +42,7 @@ void subproc_signals_cleanup(int argc, void **argv);
#define PROCNOCHECK 8
pid_t subproc_fork(void);
-int subproc_wait_check(pid_t pid, const char *desc, int flags);
+int subproc_reap(pid_t pid, const char *desc, int flags);
/** @} */
diff --git a/lib/dpkg/test/t-command.c b/lib/dpkg/test/t-command.c
index 7648e2c76..4dc88174a 100644
--- a/lib/dpkg/test/t-command.c
+++ b/lib/dpkg/test/t-command.c
@@ -178,7 +178,7 @@ test_command_exec(void)
if (pid == 0)
command_exec(&cmd);
- ret = subproc_wait_check(pid, "command exec test", 0);
+ ret = subproc_reap(pid, "command exec test", 0);
test_pass(ret == 0);
}
@@ -191,20 +191,20 @@ test_command_shell(void)
pid = subproc_fork();
if (pid == 0)
command_shell("true", "command shell pass test");
- ret = subproc_wait_check(pid, "command shell pass test", 0);
+ ret = subproc_reap(pid, "command shell pass test", 0);
test_pass(ret == 0);
pid = subproc_fork();
if (pid == 0)
command_shell("false", "command shell fail test");
- ret = subproc_wait_check(pid, "command shell fail test", PROCNOERR);
+ ret = subproc_reap(pid, "command shell fail test", PROCNOERR);
test_fail(ret == 0);
unsetenv("SHELL");
pid = subproc_fork();
if (pid == 0)
command_shell("true", "command default shell test");
- ret = subproc_wait_check(pid, "command default shell test", 0);
+ ret = subproc_reap(pid, "command default shell test", 0);
test_pass(ret == 0);
}
diff --git a/lib/dpkg/test/t-subproc.c b/lib/dpkg/test/t-subproc.c
index 1d36f4976..e1337b5af 100644
--- a/lib/dpkg/test/t-subproc.c
+++ b/lib/dpkg/test/t-subproc.c
@@ -41,38 +41,38 @@ test_subproc_fork(void)
pid = subproc_fork();
if (pid == 0)
exit(0);
- ret = subproc_wait_check(pid, "subproc exit pass", PROCNOERR);
+ ret = subproc_reap(pid, "subproc exit pass", PROCNOERR);
test_pass(ret == 0);
pid = subproc_fork();
if (pid == 0)
exit(128);
- ret = subproc_wait_check(pid, "subproc exit fail", PROCNOERR);
+ ret = subproc_reap(pid, "subproc exit fail", PROCNOERR);
test_pass(ret == 128);
/* Test signals. */
pid = subproc_fork();
if (pid == 0)
raise(SIGINT);
- ret = subproc_wait_check(pid, "subproc signal", PROCWARN);
+ ret = subproc_reap(pid, "subproc signal", PROCWARN);
test_pass(ret == -1);
pid = subproc_fork();
if (pid == 0)
raise(SIGTERM);
- ret = subproc_wait_check(pid, "subproc signal", PROCWARN);
+ ret = subproc_reap(pid, "subproc signal", PROCWARN);
test_pass(ret == -1);
pid = subproc_fork();
if (pid == 0)
raise(SIGPIPE);
- ret = subproc_wait_check(pid, "subproc SIGPIPE", PROCWARN | PROCPIPE);
+ ret = subproc_reap(pid, "subproc SIGPIPE", PROCWARN | PROCPIPE);
test_pass(ret == 0);
pid = subproc_fork();
if (pid == 0)
raise(SIGPIPE);
- ret = subproc_wait_check(pid, "subproc SIGPIPE", PROCWARN);
+ ret = subproc_reap(pid, "subproc SIGPIPE", PROCWARN);
test_pass(ret == -1);
}