Ohh ! sorry just slipped out...
As far as i understand , the /etc/printcap contains a spec of the printers
capability eg. name of the spooling directory etc... when a lpr command is
issued , the files to be printed are copied to the spooling
directory,specified in the printcap. lpr also creates a 'control file' in
addition to copies of the files to be printed.This cont' printing parameters
for the lpd. The lpr then sends a sends an IPC message to the line printer
dameon(lpd).The daemon process does a fork of itself & handles the
request,while the original lpd , waits for other print jobs. The forked copy
of the lpd looks at the files in the spool directory & sends them to the
actual printer.

Now if some thing's screwed in the printcap, it may cause unexpected
results. Or if the buffers arn't flushing .... I correct myself
fflush(NULL) , might work.

Regards
Kaushik

From: Binand Raj S. <[EMAIL PROTECTED]>
Date: Sunday, July 02, 2000 9:06 AM


> SEN forced the electrons to say:
>> Try flushing all buffers....
>> main(){ fflush(stdprn);fflush(stdin);fflush(stdout); }
>
>Aaah... Don't post wrong code here...
[snip]
>Even if you #include <stdio.h>, the stdprn error does not go away. There
>is no stdprn in Linux (or Unix or POSIX or ANSI or anything else, except
>I think in Borland/Turbo C)
>
>Also, fflush() should be used on only output streams, not on input
>streams like stdin. The results of doing otherwise are undefined.
>
>In any case, fflush(NULL) will also flush all open output streams.
>
>The remaining errors are evident from gcc's o/p.



-----------------------------------------------------------------------
The LIH mailing list archives are available at:
http://lists.linux-india.org/cgi-bin/wilma/linux-india-help

Reply via email to