From owner-freebsd-hackers Mon Aug 25 17:08:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA22483 for hackers-outgoing; Mon, 25 Aug 1997 17:08:03 -0700 (PDT) Received: from misery.sdf.com (misery.sdf.com [204.244.210.193]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id RAA22467 for ; Mon, 25 Aug 1997 17:07:56 -0700 (PDT) Received: from tom by misery.sdf.com with smtp (Exim 1.62 #1) id 0x398f-0006I9-00; Mon, 25 Aug 1997 17:05:41 -0700 Date: Mon, 25 Aug 1997 17:05:41 -0700 (PDT) From: Tom Samplonius To: Mark Tinguely cc: FreeBSD-Hackers@freebsd.org, Shimon@i-Connect.Net Subject: Re: Calling a Daemon from the Kernel - How? In-Reply-To: <199708252318.SAA13305@plains.NoDak.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 25 Aug 1997, 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. I think syslog is better example. It just hangs off /dev/log, and processes messages from the kernel. > --mark. > > Tom