[net.unix-wizards] Can you exec

wcs@ho95b.UUCP (Bill Stewart) (04/16/85)

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.

ron@BRL-TGR.ARPA (Ron Natalie) (04/23/85)

Wouldn't an easier solution be to write a pseudo-device driver that
allows you to use some of your memory space as a disk?

It works for my IBM-PC at least.

-Ron