Date: Thu, 25 Jan 2001 15:16:09 -0500 (EST) From: "Alexander N. Kabaev" <ak03@gte.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: hackers@FreeBSD.ORG Subject: RE: SYSINIT for userland? Message-ID: <XFMail.20010125151609.ak03@gte.com> In-Reply-To: <20010125115253.T26076@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <ak03@gte.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20010125151609.ak03>