Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932193AbZDHMxc (ORCPT ); Wed, 8 Apr 2009 08:53:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754333AbZDHMxV (ORCPT ); Wed, 8 Apr 2009 08:53:21 -0400 Received: from an-out-0708.google.com ([209.85.132.245]:31415 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124AbZDHMxU (ORCPT ); Wed, 8 Apr 2009 08:53:20 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=nZj7JP6JpdgP2WgDhMxHq93lBxr50H2o8PBKjDaD+BwfiT7NwDy7KHSUf0vs0C+IjS j+l894NyaRjaYM7HQrD1jiL++myBuZXxGHmmOt0xFpDOkSZcEV96AKInCg2e+DVGJFMt dqDBnYj90ZKyY7rmyIs0J1Ox9MXlg7vKhZS54= MIME-Version: 1.0 Date: Wed, 8 Apr 2009 20:53:19 +0800 Message-ID: Subject: the different effect of system call fork() From: Sino To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3674 Lines: 147 Hi, all I don't know whether this is the right place for this email, but I post it here since it concerns the system call of fork. here is my fwo source code. //fork1.cc #include #include #include #include using namespace std; int main(int argc, char **argv) { cout << "main process id: "<< getpid() << "; Parent process pid:" < #include #include #include using namespace std; int main(int argc, char **argv) { cout << "main process id: "<< getpid() << "; Parent process pid: " <