Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!vdra_ltd From: vdra_ltd@uhura.cc.rochester.edu (Valerie Drake) Newsgroups: comp.os.msdos.programmer Subject: Re: Networks, PRN, and a quirky executable Summary: What network OS? Answer for Novell Keywords: Novell Print Server Message-ID: <10032@ur-cc.UUCP> Date: 24 Oct 90 22:49:35 GMT References: <9430@helios.TAMU.EDU> Organization: University of Rochester, Rochester NY Lines: 47 In article <9430@helios.TAMU.EDU> ctl8588@rigel.tamu.edu writes: >In the real-time systems lab I have been programming in there is a >token ring network connecting the 286 and 386 PCs. I have been >redirecting my standard PRN and LPT1 to the network print server. >Now, everything works just fine...but my interest has been peeked >by a certain situation. > >I have a C program that spawns another program named 'fft.exe'. >This program can print to graphical picture to a printer. I have >found that it uses PRN by experiment. Now, the funny thing is that >if I press F1 (to print) while FFT is running the server starts >spooling but will not print. The server reports that it is spooling >the 'document' until FFT returns to my program (user must ask to end >the FFT) and then my program ends ALSO - returning to the DOS prompt. > [Edited for brevity] You should always indicate what Network OS you are using, as well as the Workstation OS. I am going to assume it is DOS and Novell, although I may be wrong. If it is Novell and you are using the CAPTURE command to redirect output, Novell requires an "END OF JOB" to be executed to recognize that the print output has ended. The easiest way to do this is to close the printer port. A more difficult way :-> is to end your program. If FFT is not closing the port within it's spawned task, CAPTURE does not know when to end the print job so just to be safe it holds it until you exit the calling program or print something else. You might try opening the print port, sending a null character, then closing the port. The other option is to set the TIMEOUT parameter on CAPTURE to some number of seconds. If this option is set CAPTURE will end the print job after XX number of seconds of inactivity. If the network is 3com Ctrl-prtscr will force an end of job. Hope this helps... +---------------------+--------------------+ "After all, they're all just | | | Monkey Boys!" | | +--+ +--+ o | -- Dr. Lizardo | | |\/ .\/. \/| o| vdra_ltd@uhura.cc.rochester.edu | ////// | | )) /\ (( | o | Val & Lee Drake (The Fish Faces) | /_ _\ | |/\+--+ +--+/\| | | University of Rochester and | ( Q ^ ) | | | Azatar MicroSystems +--,,,,----U----,,,,--+--------------------+ Rochester, NY