Loading adb/adb.c +2 −0 Original line number Diff line number Diff line Loading @@ -682,9 +682,11 @@ void start_device_log(void) dup2(fd, 1); dup2(fd, 2); fprintf(stderr,"--- adb starting (pid %d) ---\n", getpid()); adb_close(fd); fd = unix_open("/dev/null", O_RDONLY); dup2(fd, 0); adb_close(fd); } #endif Loading adb/jdwp_service.c +1 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ jdwp_control_init( JdwpControl* control, /* only wait for incoming connections */ fdevent_add(control->fde, FDE_READ); close_on_exec(s); D("jdwp control socket started (%d)\n", control->listen_socket); return 0; Loading adb/services.c +1 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 dup2(pts, 1); dup2(pts, 2); adb_close(pts); adb_close(ptm); execl(cmd, cmd, arg0, arg1, NULL); Loading adb/sysdeps.h +7 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,13 @@ static __inline__ int adb_creat(const char* path, int mode) static __inline__ int adb_socket_accept(int serverfd, struct sockaddr* addr, socklen_t *addrlen) { return accept( serverfd, addr, addrlen ); int fd; fd = accept(serverfd, addr, addrlen); if (fd >= 0) close_on_exec(fd); return fd; } #undef accept Loading Loading
adb/adb.c +2 −0 Original line number Diff line number Diff line Loading @@ -682,9 +682,11 @@ void start_device_log(void) dup2(fd, 1); dup2(fd, 2); fprintf(stderr,"--- adb starting (pid %d) ---\n", getpid()); adb_close(fd); fd = unix_open("/dev/null", O_RDONLY); dup2(fd, 0); adb_close(fd); } #endif Loading
adb/jdwp_service.c +1 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,7 @@ jdwp_control_init( JdwpControl* control, /* only wait for incoming connections */ fdevent_add(control->fde, FDE_READ); close_on_exec(s); D("jdwp control socket started (%d)\n", control->listen_socket); return 0; Loading
adb/services.c +1 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 dup2(pts, 1); dup2(pts, 2); adb_close(pts); adb_close(ptm); execl(cmd, cmd, arg0, arg1, NULL); Loading
adb/sysdeps.h +7 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,13 @@ static __inline__ int adb_creat(const char* path, int mode) static __inline__ int adb_socket_accept(int serverfd, struct sockaddr* addr, socklen_t *addrlen) { return accept( serverfd, addr, addrlen ); int fd; fd = accept(serverfd, addr, addrlen); if (fd >= 0) close_on_exec(fd); return fd; } #undef accept Loading