sundar@CASE.CSNET ("Sundar R. Iyengar") (02/28/86)
We just switched to 4.2BSD. The "inlib" command, when executed from within csh, doesn't seem to load the mentioned library (the las doesn't contain the library name). Is there a fix for this? I am also curious to know how the DM commands "ro" and "cv" work. "ro" seems to have access to a "file-modified" variable. When a pad is opened on a file through the DM command "cv", the pad header indicates the read-only nature of the pad with a "R". "ro" correctly handles toggling the read-only status of this pad (R to I and I to R). However, when a similar pad is created using the pad call "pad_$create" with a "pad_$edit" attribute (the pad header contains an I), "ro" thinks that the pad has been modified. An attribute of "pad_$read_edit" disallows "ro" to work on the pad (this is documented in the manuals). I wonder what attribute "cv" uses to create the same pad. It couldn't use "pad_$edit" unless it is able to clear the "file-modified" variable and change the pad header information (to change I to R) and it couldn't use the "pad_$read_edit" attribute because of the documented "feature". If "cv" can clear the "file-modified" variable, what system call does it use to do it? Thanks. sundar r. iyengar arpa: sundar.case@csnet-relay 531, crawford hall csnet: sundar@case case western reserve university uucp: decvax!cwruecmp!sundar cleveland, oh 44106
mishkin@APOLLO.UUCP (Nathaniel Mishkin) (03/03/86)
We just switched to 4.2BSD. The "inlib" command, when executed from within csh, doesn't seem to load the mentioned library (the las doesn't contain the library name). Is there a fix for this? "inlib" is a built-in shell (/bin/csh, /bin/sh, /com/sh) command that causes a library to be dynamically loaded into the address space of the shell that executes the command. The reason you're having a problem is because the csh invokes commands (e.g. las, and any other non-builtin) by vforking a new process and then exec'ing the command. The exec operation causes the contents of the "copied" address space -- including the thing you inlib'd -- to be wiped out. You can: set inprocess if you want the csh to do its command invocations in the same process and then the inlib'd library will be available to commands you invoke. However, then job control (which, of course, depends on the command you run being in a separate process) won't work. -- Nat Mishkin Apollo Computer apollo!mishkin -------
mishkin@APOLLO.UUCP (Nathaniel Mishkin) (03/03/86)
I am also curious to know how the DM commands "ro" and "cv" work. The file_modified variable is maintained completely within the DM. I.e. it's an attribute of the "pad" not the file. Since the DM does not use the pad_$ calls to implement CV (or any of the other DM commands), it can do whatever it pleases. As to why the semantics of the pad_$create[_window] calls differ from CV/CE in the interpretation of read-only/modified flags, that's a longer story, that I think is probably not worth going into. -- Nat Mishkin (with help from Jim Hamilton) Apollo Computer apollo!yale -------