tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

A problem running LaTeX from a daemon

I have a daemon that provides a webservice (using FastCGI behind a lighttpd 
server) on NetBSD 5.0.  It produces PDF documents by creating a .tex file, then 
running LaTeX, dvips, and ps2pdf on it.

The  exact sequence of command is:

latex <filename> >/dev/null
latex <filename> >/dev/null
dvips  -Ppdf -G0 <filename>.dvi >/dev/null 2>&1
ps2pdf  <filename>.ps >/dev/null

The daemon is started with a script in /etc/rc.d.

Now my problem is, when this sequence of commands is run from the daemon which 
was started a system boot time, it does not work.  It creates a PDF (so ps2pdf 
does run), but it is empty.  So 'latex' did not run or did not produce any dvi 

If I, however, log in to the machine as root and restart the daemon 
(/etc/rc.d/<name> restart), it works as expected, creates and delivers the PDF.

Right now, I am a bit clueless as which could cause this.  Lack of a 
controlling tty when started during boot?

Any hints would be appreciated...

- Marc

Home | Main Index | Thread Index | Old Index