diff options
author | Nick Kralevich <nnk@google.com> | 2013-01-29 13:19:20 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-01-29 13:19:20 -0800 |
commit | b94fd1abcbff1eacb8a2ad79c51de21ecf8f6d65 (patch) | |
tree | b28eb8c74fa0334137b2453235df5ee50547e3c4 | |
parent | 3400ee257c23e33f81de71bd632fca361099e4cb (diff) | |
download | system_core-b94fd1abcbff1eacb8a2ad79c51de21ecf8f6d65.zip system_core-b94fd1abcbff1eacb8a2ad79c51de21ecf8f6d65.tar.gz system_core-b94fd1abcbff1eacb8a2ad79c51de21ecf8f6d65.tar.bz2 |
cutils: remove dead code.
The last caller of this code was removed in
dalvik commit eb1703442f3fc0577b3395b7eb4d55300b4125db
(https://android-review.googlesource.com/50689)
Change-Id: I3f4865c02092752a13369a3b2c3289fc9a4f6a62
-rw-r--r-- | include/cutils/zygote.h | 1 | ||||
-rw-r--r-- | libcutils/zygote.c | 38 |
2 files changed, 0 insertions, 39 deletions
diff --git a/include/cutils/zygote.h b/include/cutils/zygote.h index 22721a6..a7480d3 100644 --- a/include/cutils/zygote.h +++ b/include/cutils/zygote.h @@ -23,7 +23,6 @@ extern "C" { int zygote_run_oneshot(int sendStdio, int argc, const char **argv); int zygote_run(int argc, const char **argv); -int zygote_run_wait(int argc, const char **argv, void (*post_run_func)(int)); #ifdef __cplusplus } diff --git a/libcutils/zygote.c b/libcutils/zygote.c index 75ce3ba..37236e8 100644 --- a/libcutils/zygote.c +++ b/libcutils/zygote.c @@ -159,44 +159,6 @@ static int send_request(int fd, int sendStdio, int argc, const char **argv) #endif /* HAVE_ANDROID_OS */ } -int zygote_run_wait(int argc, const char **argv, void (*post_run_func)(int)) -{ - int fd; - int pid; - int err; - const char *newargv[argc + 1]; - - fd = socket_local_client(ZYGOTE_SOCKET, - ANDROID_SOCKET_NAMESPACE_RESERVED, AF_LOCAL); - - if (fd < 0) { - return -1; - } - - // The command socket is passed to the peer as close-on-exec - // and will close when the peer dies - newargv[0] = "--peer-wait"; - memcpy(newargv + 1, argv, argc * sizeof(*argv)); - - pid = send_request(fd, 1, argc + 1, newargv); - - if (pid > 0 && post_run_func != NULL) { - post_run_func(pid); - } - - // Wait for socket to close - do { - int dummy; - err = read(fd, &dummy, sizeof(dummy)); - } while ((err < 0 && errno == EINTR) || err != 0); - - do { - err = close(fd); - } while (err < 0 && errno == EINTR); - - return 0; -} - /** * Spawns a new dalvik instance via the Zygote process. The non-zygote * arguments are passed to com.android.internal.os.RuntimeInit(). The |