Subject: Re: fd to executable
To: Thorbjorn Jemander <thoan@ifm.liu.se>
From: Al Snell <alaric@alaric-snell.com>
List: tech-misc
Date: 01/03/2001 11:24:21
On Wed, 3 Jan 2001, Thorbjorn Jemander wrote:

> The reason for asking is to find out if there is a way
> to store data (read-only) in the executable itself, much
> like the resources on MacOS and BeOS. (Not to be confused
> with the X11 resources, separate files acting as 'preferences'
> mostly). While storing data seem to be possible, finding the
> executable on disk seems to be more difficult.
>=20
> Anyone have any ideas?

/proc/curproc/file

But what's wrong with just compiling the data directly into the
text of the binary - it'll be demand loaded, so don't worry about virtual
memory usage (although if you plan on having a gigabyte of resources,
address space usage may be a worry), and it'll be more portable than /proc

>=20
> /Thorbj=F6rn Jemander
>=20

ABS

--=20
                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software =20