Skip to content

Commit 1a65a30

Browse files
Dave Plattandi34
authored andcommitted
Remove old fork-and-specialize API
As promised, this is the cleanup patch-set which removes the old native "fork and specialize" API, which has been replaced by a slightly-enhanced one which can close the Zygote socket descriptors in the Zygote child. Change-Id: Icaeab730bee8638354dc664524e4118cdd946d2f
1 parent 90c7c5d commit 1a65a30

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

dalvik/src/main/java/dalvik/system/Zygote.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,14 @@ public static int fork() {
133133
public static int forkAndSpecialize(int uid, int gid, int[] gids, int debugFlags,
134134
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose) {
135135
preFork();
136-
int pid = nativeForkAndSpecialize_new(
137-
uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose);
138-
postFork();
139-
return pid;
140-
}
141-
142-
public static int forkAndSpecialize(int uid, int gid, int[] gids, int debugFlags,
143-
int[][] rlimits, int mountExternal, String seInfo, String niceName) {
144-
preFork();
145136
int pid = nativeForkAndSpecialize(
146-
uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName);
137+
uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose);
147138
postFork();
148139
return pid;
149140
}
150141

151-
native public static int nativeForkAndSpecialize_new(int uid, int gid, int[] gids, int debugFlags,
152-
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose);
153-
154142
native public static int nativeForkAndSpecialize(int uid, int gid, int[] gids, int debugFlags,
155-
int[][] rlimits, int mountExternal, String seInfo, String niceName);
143+
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose);
156144

157145
/**
158146
* Special method to start the system server process. In addition to the

0 commit comments

Comments
 (0)