Swapping [Unix processes]

Chris Torek chris at mimsy.UUCP
Wed Apr 12 15:10:24 AEST 1989


In article <450 at jolnet.ORPK.IL.US> acarter at jolnet.ORPK.IL.US
(Alfonso Carter) writes:
>Is it possible to take a process between two users and switch them?
>Say user "joe" is editing a file, and "dan" is playing nethack.
>Is it possible to change it so in an instant, joe is playing
>nethack, and dan is editing that file?

That would not be secure.

It might be made secure if the switch required that the uids be
equal, or the invoker were root.  This sort of thing is possible
if you replace vhangup with an `fswitch' system call.

More generally, cooperating user processes can do this by talking
with a server over one of the non-parent/child IPC facilities present
in later Unixes.  This tends to be less efficient than is desirable.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list