tech-userlevel archive

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

Re: A problem running LaTeX from a daemon

Marc Balmer <> writes:

> 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 file.
> 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?

I would definitely suggest either the lack of controlling tty or stdin.
latex is not interactive if the input is ok, but if it hits problems
then (tex really) will prompt.

So it would not surprise me if stdin were checked early on just in case
and there is trouble if latex/tex is not satisfied.

So I would try an explicit redirect to /dev/null; I'm not at all clear
on stdin at rc.conf time.

You could also run the command under ktrace and see what it does to stdin.

Attachment: pgpUfrR2deoxH.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index