From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,6a9b6debcbc15952,start X-Google-Attributes: gidf7344,public X-Google-Thread: fc7fa,6a9b6debcbc15952,start X-Google-Attributes: gidfc7fa,public X-Google-ArrivalTime: 1992-05-05 19:17:08 PST Xref: sparky comp.os.vms:9105 comp.sys.vms:2 Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!bgsuvax!jburian From: jburian@bgsu.edu (John M. Burian) Newsgroups: comp.os.vms,comp.sys.vms Subject: Detached process, connecting I/O problem Message-ID: <10084@bgsuvax.bgsu.edu> Date: 6 May 92 02:17:08 GMT Followup-To: poster Organization: Bowling Green State University B.G., Oh. I seem to be having a small problem with creating detatched processes and assigning devices for the detatched process to use for I/O. My programs do as follows: Parent: Calls SYS$GETDVI, asks for DVI$_DEVNAM (device name) No problem here, the terminal name comes back just fine. (Example "_TWA362") Build a descriptor to pass to SYS$CREPRC, using name passed back from $GETDVI and strlen() of that name. There might be a problem with the way I build the descriptor, but everything looks ok as far as I can tell. Call SYS$CREPRC using above descriptor as the _input_ parm, and using the DETACH option. Again, no problem, the detached process starts happily, no errors. Child: Builds descriptor for SYS$INPUT (using $DESCRIPTOR macro) Use SYS$ASSIGN to assign SYS$INPUT to a channel. So far, so good. Call SYS$GETDVI again, to make sure the child is dealing with the same device that the parent was. I pass the newly-assigned channel number to identify the device. Here is where things go south - $GETDVI returns a 1324, IVDEVAM error. Examining the value of the channel reveals the channel is 0 - that explains $GETDVI's problem, it thinks that I didn't pass it a channel or a device name to use. The question is, why is does the $ASSIGN set the channel to 0? I am deeply confused. The parent process generally exits before the child, but since the child is detached, is this a problem? I have a suspistion the problem is with the parms to $CREPRC, but I can't think of anything I'm doing wrong. I am a little new to VMS system programming, and it is entirel possible I am missing some trivial detail. I would greatly appreciate any help, and will happily provide code and more detail (if necessary) to anybody. Responses by mail would be best, and I'll post a summary if anything earthshattering comes out. Thanks, John M. Burian jburian@andy.bgsu.edu jburian@opie.bgsu.edu