Path: utzoo!attcan!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!VB.CC.CMU.EDU!R022AF07 From: R022AF07@VB.CC.CMU.EDU (Andy Foulke) Newsgroups: comp.os.vms Subject: Subprocess creation problem Message-ID: <8805240340.AA01194@ucbvax.Berkeley.EDU> Date: 20 May 88 19:55:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 86 Hello All, I have been having a problem with a program creating a process using CREPRC. If the output of the executable has been redirected in ANY way it doesn't create the subprocess and execute the commands in the datafile. I have included the coding of a short pascal program and the datafile below. Now to explain my problem in a little more detail... For example, The program works fine when I use the following DCL commands: $RUN DETACH_PROG $TYPE SYS$LOGIN:DETACH_PROG.LOG [....log file is here with information...] HOWEVER, If I use the /INPUT, /OUTPUT or /DETACH qualifier the program doesn't create the log file and doesn`t execute the commands in DETACH_PROG.DAT. It seems ANY redirection of I/O to the program will cause the subprocess not to be created. For example, $RUN DETACH_PROG /OUTPUT=SYS$LOGIN:ANYTHING.HERE $TYPE SYS$LOGIN:DETACH_PROG.LOG or $RUN DETACH_PROG /DETACH $TYPE SYS$LOGIN:DETACH_PROG.LOG Any ideas or suggestions why it won't work?!?! I am working with VMS 4.7 and have PASCAL 3.5. My process quotas are as follows and I even have DETACH privilege enabled. (Even though DETACH isn't needed here) Process Quotas: CPU limit: Infinite Direct I/O limit: 18 Buffered I/O byte count quota: 49904 Buffered I/O limit: 18 Timer queue entry quota: 10 Open file quota: 114 Paging file quota: 28711 Subprocess quota: 4 Default page fault cluster: 64 AST limit: 22 Enqueue quota: 200 Shared file limit: 0 Max detached processes: 0 Max active jobs: 0 Please send any replies to me, as I will be sure to summarize a solution to the net if one is found! Thank You!, U CCCCC U Joseph Rafail U C M U Carnegie Mellon University U CCCCC U Computing Services - Software Development UUUUUUUUU R022JR3H@VB.CC.CMU.EDU (or CMCCVB.Bitnet) ------------------------------- CUT HERE --------------------------------- { DETACH_PROG.PAS -- This program creates a process and runs DETACH_PROG.DAT} [INHERIT('SYS$LIBRARY:STARLET.PEN')] PROGRAM DETACH_PROG(INPUT,OUTPUT); VAR PID_ADR : UNSIGNED; PRCNAM,ERROR_STUFF,OUTPUT_STUFF,INPUT_STUFF,IMAGE: VARYING[50] OF CHAR; STATUS : INTEGER; BEGIN STATUS := 0; PRCNAM := 'DETACH_PROG'; IMAGE := 'SYS$SYSTEM:LOGINOUT.EXE'; INPUT_STUFF := 'SYS$LOGIN:DETACH_PROG.DAT'; OUTPUT_STUFF := 'SYS$LOGIN:DETACH_PROG.LOG'; ERROR_STUFF := 'SYS$LOGIN:DETACH_PROG.ERR'; STATUS := $CREPRC(PID_ADR,IMAGE,INPUT_STUFF, OUTPUT_STUFF,ERROR_STUFF,,, PRCNAM,,,,,); WRITELN('STATUS OF DETACH_PROG IS ',STATUS); END. ------------------------------- CUT HERE --------------------------------- $! DETACH_PROG.DAT file which will be executed $WRITE SYS$OUTPUT "THIS IS LINE ONE." $WRITE SYS$OUTPUT "THIS IS LINE TWO." ------------------------------- CUT HERE ---------------------------------