[comp.unix.msdos] Unbuffered printing in vpix?

spear@druco.ATT.COM (SpearmanS) (01/09/91)

Under Simultask 3.0, I get lots of complaints from users
that their DOS programs don't fully print out until they
exit DOS.  There is the 'flush' command from the DOS command
line to flush the buffer and cause printing to finish, but
it requires leaving the application package often.

The best I've come up with is running a TSR that can pop up
a DOS prompt and let me 'flush' the print queue.  Is there
any other way to get an automatic (perhaps timed) flush
so that a print occurs fairly normally from a DOS user's 
perspective?

Thanks

Steve Spearman  spear@druco.att.com

mike@bria.UUCP (Michael Stefanik) (01/10/91)

In article <7138@drutx.ATT.COM> druco.ATT.COM!spear (SpearmanS) writes:
>Under Simultask 3.0, I get lots of complaints from users
>that their DOS programs don't fully print out until they
>exit DOS.  There is the 'flush' command from the DOS command
>line to flush the buffer and cause printing to finish, but
>it requires leaving the application package often.
>

I had some customers with the same problem; my solution was to write a
program that reads stdin and popen()'s lp, and flushing in between.
You set it up as the program that is execexuted on that LPT in the
vpix config file.  If you want a copy, send me mail.
-- 
Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation
UUCP: ...!uunet!bria!mike
--
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."

rudolf@curano.acadch.com (Rudolf Kuenzli) (01/12/91)

In <1674@svin02.info.win.tue.nl> debra@svin02.info.win.tue.nl (Paul de Bra) writes:

>What about the standard menu you get by hitting ALT-SYSREQ m
>and then selecting the item for flushing the print buffer?
>I don't see any use in developing a tsr to be activated when at
>the dos prompt as this menu item seems to work just fine.
>(it's in tfm)

Yes it is in the manual indeed. Anyway using ALT-SYSREQ and then 
flushing the printer by hitting 'P' hase some undesired results
sometimes on my system. After flushing I lowercase characters show up in
UPPERCASE and vice versa. Sometimes it can be fixed just with SHIFT
DDDD. Sometimes it doesn't I have to leave vpix. Running MS-WORD I am
then not capable to save the stuff, so I learned to save before...

-- 
Don Curano The Magician 		  In real life: Rudolf Kuenzli
uucp: ...uunet!autodesk!adeskch!rudolf	  Internet: rudolf@curano.acadch.com
      ...chx400!adeskch!rudolf			    rudolf@adeskch.uu.ch

les@chinet.chi.il.us (Leslie Mikesell) (01/18/91)

In article <2502@westmark.WESTMARK.COM> dave@westmark.WESTMARK.COM (Dave Levenson) writes:
>In article <7138@drutx.ATT.COM>, spear@druco.ATT.COM (SpearmanS) writes:
>> Under Simultask 3.0, I get lots of complaints from users
>> that their DOS programs don't fully print out until they
>> exit DOS.

>The problem is that the system generally doesn't know when the
>MS-DOS application has ended.  Dos applications generally don't
>close the printer file, because they think it's a device. Without
>the close, your TSR wouldn't know whether the stuff that's been
>written to the printer is complete.  Even when your application
>ends, UNIX can't tell - there's no UNIX process that ends at that
>point.  Whether MS-DOS is running the command.com or your program,
>it's still one process to UNIX. 

Don't be so kind to VP/ix.  Many MS-DOS programs DO close the printer
device and reasonable network redirectors detect the close and
respond correctly by flushing to the print spooler.  Many other
programs that don't close the default printer device can be configured
to write to a file named LPT1: instead, and will then close it properly.
In any case, exiting the application should always force the close and
be detected by the redirector.

This problem and the fact that multi-user access to files is allowed
without netbios style file locking makes VP/ix unusable in a production
environment.  And, of course the fact that it won't run the most
popular DOS word processor (WP) unless everything is on a DOS partition
or virtual disk sort of indicates that no one cares if it is usable or
not.

>This is why VP/ix requires that the
>operator take some action to flush the print queue.  The operator
>knows when a complete listing is ready for printing.

On the contrary - with modern DOS programs that provide background
printing internally, the operater generally doesn't know, but
network-aware programs will close the device to inform the redirector.

>OS-Merge, as I recall (it's been a year or more) uses a timer
>algorithm.  If the MS-DOS process has written something to the
>printer, and has not written any more for N seconds (N is locally
>administerable, but I think it defaults to 10) then it flushes the
>queue.

This is reasonable as long as it can be configured per-user and disabled
if necessary.

Les Mikesell
  les@chinet.chi.il.us