From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 15 19:47:38 2006 Return-Path: X-Original-To: hackers@FreeBSD.ORG 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 1EE0716A4DF for ; Sat, 15 Jul 2006 19:47:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C36643D46 for ; Sat, 15 Jul 2006 19:47:37 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6FJjYQB042633; Sat, 15 Jul 2006 13:45:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 15 Jul 2006 13:45:47 -0600 (MDT) Message-Id: <20060715.134547.1159135432.imp@bsdimp.com> To: mykola.stryebkov@gmail.com From: "M. Warner Losh" In-Reply-To: <20060714143514.GA2838@taran.infoua.com.ua> References: <20060714134953.GA2404@taran.infoua.com.ua> <44B7A2C8.7050407@fs.ei.tum.de> <20060714143514.GA2838@taran.infoua.com.ua> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 15 Jul 2006 13:45:35 -0600 (MDT) Cc: hackers@FreeBSD.ORG, corecode@fs.ei.tum.de Subject: Re: fork inside ip_input X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2006 19:47:38 -0000 In message: <20060714143514.GA2838@taran.infoua.com.ua> mykola.stryebkov@gmail.com writes: : On 14.07.2006 15:57:28, Simon 'corecode' Schubert wrote: : > Mykola Stryebkov wrote: : > >Hi all. : > > : > >Have a strange question: is it possible to create new process (using : > >fork or fork1) from inside of ip_input()? : > : > i don't think so. : > : > >In kernel sources i found example of using fork1 in init_main.c but : > >looking into ip_input.c i do not understand where i can get pointers to : > >a thread and parent process to pass it into fork1. : > : > only a process can fork, but ip_input is run from interrupt, not in a : > process context. which process do you want to fork anyways? : : I want to start user-level process on first incoming RTP packet to : install and keep TCP control connection. Why not start it at boot, and signal/kick it somehow when RTP connections need to be managed... warner