Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU.UUCP Newsgroups: mod.computers.vax Subject: Re: Submission for mod-computers-vax Message-ID: <870303231253.02r@CitHex.Caltech.Edu> Date: Wed, 4-Mar-87 02:15:09 EST Article-I.D.: CitHex.870303231253.02r Posted: Wed Mar 4 02:15:09 1987 Date-Received: Fri, 6-Mar-87 02:11:09 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 72 Approved: info-vax@sri-kl.arpa > What does $RUN/AUTH actually do? (VMS) It says to look in your SYSUAF entry to find defaults for such things as the job's UIC, its default directory, its pagefile quota, and so forth (I mention these three items in particular for a reason). > I am trying to initiate a detached process when logged in as myself. I > want the process to behave as if SYSTEM actually detached it. To do this, you must do more or less the the same way SYSTEM does it. > With $RUN/AUTH/UIC=[1,4] the /uic unfortunately seems to be ignored and > the process gets detached with my uic. The log file shows a DCL trace of > it executing my personal login.com. Finally (and what matters) the > process happens to run a program which calls lib$spawn. This works, the > subprocess gets spawned (and sends me a mail). That's right; it looks up your entry in the SYSUAF, and it finds a value to use for UIC, so it applies it. (One of the three items above accounted for). It also finds your personal default path (that's the second of the two items). If a job you'd logged in yourself is capable of spawning a subprocess and sending you mail, then a process created using RUN/AUTH should also be capable of doing it. > Now, with RUN/NOAUTH the original detached process is created detached as > before, but with UIC [1,4] as specified in the /UIC qualifier. Great, > that's what I wanted! The log file shows a DCL trace of it executing > sylogin.com (but not my login.com). Unfortunately my call to lib$spawn > fails and I don't know why. I'm not even sure how to find out... Now the system can't look in the SYSUAF to find out what to use for defaults for process parameters you don't supply. You supplied a uic, so it used that; if you hadn't specified a UIC, it would have defaulted to your own. EVERY job has to execute SYS$SYLOGIN:.COM (that's why it exists). To find out for sure why LIB$SPAWN fails, you can do one of several things: 1) Add code to the program that calls LIB$SPAWN to check to make sure the spawn succeeds, and if not to return the information as to why; 2) You can enable accounting for PROCESSES (both DETACHED and SUBPROCESSES), and for IMAGES, and look in the accounting records for the cause of death of your image and process which were DOA. 3) You can read the documentation for $CREPRC (the system call that is used to create a new process), and figure out that the /NOAUTH qualifier to the RUN command corresponds to the status flag PRC$M_NOUAF for the $CREPRC system call (formerly called PRC$M_LOGIN, since one of the most obvious things it does is to affect the procedures a job runs at login time (that's how I figured all this out); 4) You can simplify the command procedure that you're using, and instead of running your own image to spawn the subprocess, use the DCL SPAWN command, and have frequent instances of the command: $ WRITE SYS$OUTPUT $STATUS so you can figure out at what point the job is dying. My guess is that it's probably going to be cause of death number %X00158214, "%LIB-F-INSVIRMEM, insufficient virtual memory". With the /NOAUTH modifier, RUN will use the value of PQL_DPGFLQUOTA, the system default page file quota limit (the third and last of the items mentioned above) when it creates the process. On my system, that's the default that VMSINSTAL picked when I last installed VMS, 2048 pages. The default specified in the SYSUAF is (again, on my system) 14336 pages, or seven times what is used with the /NOAUTH qualifier. > SO: What is the behaviour of /AUTH and /NOAUTH. What's going on? What's going on is that you're being a bit lazier than you can afford to in this situation: if you want a job to have a certain set of characteristics, specify them explicitly; if the run command won't let you specify the values you want, write your own program calling $CREPRC. (For example, while the RUN commnand lets you disable swapping for a job being created, it won't let you disable adjustment of the working set; $CREPRC will).