diff options
author | Yabin Cui <yabinc@google.com> | 2014-11-11 09:24:11 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2014-11-12 17:06:27 -0800 |
commit | e77b6a08623bba383ce55cd6653bec76cdf57792 (patch) | |
tree | 2b96cd6e724fa808471c943bda81b2b9486f1ca6 /adb/services.c | |
parent | ca1797ae00d3b5bf2eb4d1cad5bb68cef0074346 (diff) | |
download | system_core-e77b6a08623bba383ce55cd6653bec76cdf57792.zip system_core-e77b6a08623bba383ce55cd6653bec76cdf57792.tar.gz system_core-e77b6a08623bba383ce55cd6653bec76cdf57792.tar.bz2 |
kill HAVE_FORKEXEC
Bug: 18317407
Change-Id: I4eecb3c9d745e3dabfc46fa595aac7f94f6d93e3
Diffstat (limited to 'adb/services.c')
-rw-r--r-- | adb/services.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/adb/services.c b/adb/services.c index e61371a..bcfc163 100644 --- a/adb/services.c +++ b/adb/services.c @@ -202,10 +202,10 @@ static void init_subproc_child() static int create_subproc_pty(const char *cmd, const char *arg0, const char *arg1, pid_t *pid) { D("create_subproc_pty(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1); -#ifdef HAVE_WIN32_PROC +#if defined(_WIN32) fprintf(stderr, "error: create_subproc_pty not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1); return -1; -#else /* !HAVE_WIN32_PROC */ +#else int ptm; ptm = unix_open("/dev/ptmx", O_RDWR | O_CLOEXEC); // | O_NOCTTY); @@ -251,16 +251,16 @@ static int create_subproc_pty(const char *cmd, const char *arg0, const char *arg } else { return ptm; } -#endif /* !HAVE_WIN32_PROC */ +#endif /* !defined(_WIN32) */ } static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg1, pid_t *pid) { D("create_subproc_raw(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1); -#ifdef HAVE_WIN32_PROC +#if defined(_WIN32) fprintf(stderr, "error: create_subproc_raw not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1); return -1; -#else /* !HAVE_WIN32_PROC */ +#else // 0 is parent socket, 1 is child socket int sv[2]; @@ -295,7 +295,7 @@ static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg adb_close(sv[1]); return sv[0]; } -#endif /* !HAVE_WIN32_PROC */ +#endif /* !defined(_WIN32) */ } #endif /* !ABD_HOST */ |