Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!ll-xn!mit-eddie!genrad!decvax!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.unix-wizards Subject: Re: Writing on shared texts Message-ID: <8576@sun.uucp> Date: Mon, 27-Oct-86 13:53:57 EST Article-I.D.: sun.8576 Posted: Mon Oct 27 13:53:57 1986 Date-Received: Mon, 27-Oct-86 23:20:23 EST References: <115@tijc02.UUCP> <735@hropus.UUCP> <1040@ho95e.UUCP> <1269@ttrdc.UUCP> <8545@sun.uucp> <14976@onfcanim.UUCP> Organization: Sun Microsystems, Inc. Lines: 23 > To do this, just zero the inode pointer in the text table, After having made *damn* sure you've caught all the code that assumes that "x_iptr" is never null for a valid text table entry, and changed "xalloc" not to use a null "x_iptr" as an indication of a free text table entry. (You definitely have to do this with a non-paging S5R2; as I remember, that code hadn't changed much since V7.) > In the case of a system that doesn't load the entire binary at once > (e.g. demand paging), it is much messier. There is still no problem > in providing a clean copy of the new code for new execs, contrary to > what Guy suggests - just "detach" the text structure as before. Gee, I wasn't aware that I suggested that you can't do it even with the changes you mention. My point was that *with the V7/4BSD/unpaged S5R2 implementation* there is a reason for forbidding writes to active shared text files. Another possibility is to do what's done with NFS and kill the process if it tries to fetch a page from the file and the file has been written since the last time you looked at it. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)