From owner-freebsd-hackers Thu Jan 25 12:16:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from h132-197-97-45.gte.com (h132-197-97-45.gte.com [132.197.97.45]) by hub.freebsd.org (Postfix) with ESMTP id E4ADB37B69B for ; Thu, 25 Jan 2001 12:16:18 -0800 (PST) Received: (from ak03@localhost) by h132-197-97-45.gte.com (8.11.1/8.11.1) id f0PKG9u02737; Thu, 25 Jan 2001 15:16:10 -0500 (EST) (envelope-from ak03) Message-ID: X-Mailer: XFMail 1.4.6-3 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010125115253.T26076@fw.wintelcom.net> Date: Thu, 25 Jan 2001 15:16:09 -0500 (EST) Organization: Verizon Laboratories Inc. From: "Alexander N. Kabaev" To: Alfred Perlstein Subject: RE: SYSINIT for userland? Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Will functions marked with __attribute__((__constructor__)) or __attribute__((__destructor__)) satisfy your needs? Compiler will insert calls to these functions gets into .init section of the resulting ELF module which in turn will be called automatically at the program startup time. I do not remember exactly, but there might be even priority parameter you can specify with these attributes to manage the order in which these functions will be called. On 25-Jan-2001 Alfred Perlstein wrote: > Has anyone done any work for FreeBSD or GNU C that allows for > SYSINITs in userland, meaning just having to specify a function > and arg to be called at a certain time during program startup? > > I know you can do some evil magic with overloading special shared > object symbols, but it is evil magic. :) > > Anyone know of another OS that supports this? Any standards for > it on the way? > > -- > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > "I have the heart of a child; I keep it in a jar on my desk." > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message ---------------------------------- E-Mail: Alexander N. Kabaev Date: 25-Jan-2001 Time: 15:10:40 ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message