From owner-freebsd-hackers Tue Aug 26 14:24:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA08938 for hackers-outgoing; Tue, 26 Aug 1997 14:24:23 -0700 (PDT) Received: from iafnl.es.iaf.nl (uucp@iafnl.es.iaf.nl [195.108.17.20]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id OAA08912 for ; Tue, 26 Aug 1997 14:24:02 -0700 (PDT) Received: by iafnl.es.iaf.nl with UUCP id AA26390 (5.67b/IDA-1.5 for FreeBSD-Hackers@FreeBSD.ORG); Tue, 26 Aug 1997 23:24:17 +0200 Received: (from wilko@localhost) by yedi.iaf.nl (8.8.5/8.6.12) id TAA00851; Tue, 26 Aug 1997 19:15:23 +0200 (MET DST) From: Wilko Bulte Message-Id: <199708261715.TAA00851@yedi.iaf.nl> Subject: Re: Calling a Daemon from the Kernel - How? To: tinguely@plains.NoDak.edu (Mark Tinguely) Date: Tue, 26 Aug 1997 19:15:22 +0200 (MET DST) Cc: FreeBSD-Hackers@FreeBSD.ORG, Shimon@i-Connect.Net In-Reply-To: <199708252318.SAA13305@plains.NoDak.edu> from "Mark Tinguely" at Aug 25, 97 06:18:11 pm X-Organisation: Private FreeBSD site - Arnhem, The Netherlands X-Pgp-Info: PGP public key at 'finger wilko@freefall.freebsd.org' X-Mailer: ELM [version 2.4 PL24 ME8a] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Mark Tinguely wrote... > > > How do I write a program that gets called from the kernel. > > I know how to write a program that call the kernel :-) > > I even know (some of you may argue with this) how to write a kernel driver > > that gets called form userspace :-) > > > > I want to write a daemon (or whatever) that gets called by the kernel to do > > sone dirty work I do not think belongs in the kernel. > > you really do not want the kernel to make a user space and exec (look at > the gross things the kernel needs to do to get init running). > > it be easier to make a raw socket interface for the communication and > have the daemon start in user space from something like /etc/rc.local. > A good example of this is mrouted. Or implement a ioctl that is called by the userspace thingy and get's blocked in the ioctl code until needed. Not nice, but works _ ____________________________________________________________________ | / o / / _ Bulte email: wilko@yedi.iaf.nl http://www.tcja.nl/~wilko |/|/ / / /( (_) Arnhem, The Netherlands - Do, or do not. There is no 'try' ----------------------------------------------------------------------Yoda