[pdftex] Re: redirecting tex dvi output

Lloyd Dalton daltonlp at yahoo.com
Mon Jan 14 15:13:39 CET 2002

Marcin Kasperski wrote:
>I have never tried but what would happen if one
>creates named pipe of
>name 'texput.pdf' just before running pdftex?

Good idea--I tried this, but unfortunately named pipes
are "blocking"--their process halts until the output
of the pipe is read.  For my application, the call to
pdflatex is made by the same perl script that is
inteneded to read the output:


  #sample tex
  $temp_text = <<p1;
\\title{A test}
\\author{Jane Doe}
\\date{September 1994}
   This is a test!

  #for this example, there is a named pipe
  #called "texput.pdf" already in the 
  #current directory (created with "mkfifo

  #the >/dev/null redirects the
  open filehandle, "|pdflatex >/dev/null";
  print filehandle $temp_text;
  close filehandle;
  print "done!\n";

  If you run the above script in one shell window, it
will lock up, until you type "cat <texput.pdf" in a
different window.

  If you change the "open" line to:

  open filehandle, "|-pdflatex >/dev/null";

  The script no longer locks up, but the named pipe is
empty (not sure why).

  Even if the named pipes worked to fix the problem,
it seems like kind of a less-than-beautiful solution
:)  I hope there is a different way...


Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!

More information about the pdftex mailing list