Skip to content

Commit 29a0b87

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: I33f504afd242e268863270139b4e421d4b0728f2
1 parent 7004b0c commit 29a0b87

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

vm/native/dalvik_system_Zygote.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -740,27 +740,12 @@ static pid_t forkAndSpecializeCommon(const u4* args, bool isSystemServer, bool l
740740
* int[] gids, int debugFlags, int[][] rlimits, int mountExternal,
741741
* String seInfo, String niceName, int[] fdsToClose);
742742
*/
743-
static void Dalvik_dalvik_system_Zygote_forkAndSpecialize_new(const u4* args,
744-
JValue* pResult)
745-
{
746-
pid_t pid;
747-
748-
pid = forkAndSpecializeCommon(args, false, false);
749-
750-
RETURN_INT(pid);
751-
}
752-
753-
/*
754-
* native public static int nativeForkAndSpecialize(int uid, int gid,
755-
* int[] gids, int debugFlags, int[][] rlimits, int mountExternal,
756-
* String seInfo, String niceName);
757-
*/
758743
static void Dalvik_dalvik_system_Zygote_forkAndSpecialize(const u4* args,
759744
JValue* pResult)
760745
{
761746
pid_t pid;
762747

763-
pid = forkAndSpecializeCommon(args, false, true);
748+
pid = forkAndSpecializeCommon(args, false, false);
764749

765750
RETURN_INT(pid);
766751
}
@@ -798,8 +783,6 @@ const DalvikNativeMethod dvm_dalvik_system_Zygote[] = {
798783
{ "nativeFork", "()I",
799784
Dalvik_dalvik_system_Zygote_fork },
800785
{ "nativeForkAndSpecialize", "(II[II[[IILjava/lang/String;Ljava/lang/String;[I)I",
801-
Dalvik_dalvik_system_Zygote_forkAndSpecialize_new },
802-
{ "nativeForkAndSpecialize", "(II[II[[IILjava/lang/String;Ljava/lang/String;)I",
803786
Dalvik_dalvik_system_Zygote_forkAndSpecialize },
804787
{ "nativeForkSystemServer", "(II[II[[IJJ)I",
805788
Dalvik_dalvik_system_Zygote_forkSystemServer },

0 commit comments

Comments
 (0)