[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] [PATCH] use vfork to replace fork directly in linp

From: Barry Song
Subject: [Linphone-developers] [PATCH] use vfork to replace fork directly in linphonecsh
Date: Tue, 10 Nov 2009 16:27:39 +0800

Using macro __BFIN__ to describle uClinux target in trunk is not always right 
because Blackfin is not the only platform to run uClinux.
Here replacing fork by vfork should be better for both uClinux and with-MMU 
For uClinux, there is no fork at all, then we have to use vfork;
For Linux, since sub-process will call exec() at once, vfork will help to avoid 
the overhead to copy mm_struct.

Signed-off-by: Graff Yang <address@hidden>
Signed-off-by: Barry Song <address@hidden>
Index: linphone/console/shell.c
--- trunk/linphone/console/shell.c      (revision 755)
+++ trunk/linphone/console/shell.c      (working copy)
@@ -142,11 +142,7 @@
-#ifdef __BFIN__    /* is a uClinux target */
        pid = vfork();
-       pid = fork();
        if (pid < 0){
                fprintf(stderr,"Could not fork\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]