From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 22 08:50:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4D4916A4CE for ; Wed, 22 Sep 2004 08:50:01 +0000 (GMT) Received: from hotmail.com (bay1-f12.bay1.hotmail.com [65.54.245.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CBD143D41 for ; Wed, 22 Sep 2004 08:50:01 +0000 (GMT) (envelope-from kylincsos@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 22 Sep 2004 01:50:01 -0700 Received: from 61.187.16.2 by by1fd.bay1.hotmail.msn.com with HTTP; Wed, 22 Sep 2004 08:49:11 GMT X-Originating-IP: [61.187.16.2] X-Originating-Email: [kylincsos@hotmail.com] X-Sender: kylincsos@hotmail.com From: "Gordon David" To: freebsd-hackers@freebsd.org Date: Wed, 22 Sep 2004 08:49:11 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 22 Sep 2004 08:50:01.0142 (UTC) FILETIME=[255EED60:01C4A081] X-Mailman-Approved-At: Wed, 22 Sep 2004 12:11:50 +0000 Subject: execute a user process in the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 08:50:01 -0000 Hello, I have a question. Anyone would like to tell me how to execute a user process or shell script in the kernel? As we know, the kernel forks a process named initproc and executes /sbin/init, etc. If I want to execute a user level process, such as a simple printf("Hello world") in a driver, what shall I do? Thanks Gordon _________________________________________________________________ 享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com