Can you exec() a program from memory instead of disk?

Bill Stewart wcs at ho95b.UUCP
Tue Apr 16 12:23:16 AEST 1985


I'd like to read a program into memory, do a few other things, and then
exec the program.  Is there a clean way to do this?  (I assume I can do
this if I go hack kmem a lot, but I'd rather avoid/minimze that.)

Alternatively, unmounting a disk while executing a program that lives
on it would do just as well, but UNIX seems to frown on such
behaviour.

The motivation for this is that I'm ordering a stripped-down VENIX-86
for a two-floppy-disk PC;  there's lots of RAM but only two disks,
and the user's program and data may not all fit on the non-system-disk
floppy.  It would be nice to start up a program living on floppy disk 1,
(unmount and) switch floopy disks, and run with the user's data disk in
drive 1.

It doesn't look too hard to hack a program that reads a data file into
core, closes the file, unmounts the disk, and sends its output to a
pipe, or to do the corresponding program to catch stdout, but the
middle part looks tough.   Help?

		Thanks;
			Bill Stewart, AT&T Bell Labs, Holmdel NJ
			{ihnp4, allegra, cbosg}!ho95c!wcs

P.S. VENIX-86 seems like a nice system.  I've played with a hard-disk
	version,  and there was a Data General Portable at UniForum 
	running a two-floppy VENIX, complete with csh and vi.



More information about the Comp.unix.wizards mailing list