[NTG-context] calling ConTeXt as a background process

Henning Hraban Ramm hraban at fiee.net
Thu Oct 7 09:06:17 CEST 2010

Hi together!

I'm trying since about a week to get ConTeXt running as a background  
process of a web application.
It's always hanging, and I get no log.

"ps axef" shows the call stack:

  \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ 
manage.py runfcgi method=threaded ...
     \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ 
texmf-linux-64/bin/context ...
         \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- 
purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf
             \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun  
--script context --purgeall --batchmode --result=/ ...
                 \_ [uname] <defunct>

I.e. it looks like texlua calls uname in a way that lets the process  
hang forever.
If I call the same from an active shell everything runs fine. Also  
uname alone works in the shell command.
Any ideas what I could/should check?

I don't think it could be the PATH, since ConTeXt's bin as well as all  
the system tools are in:

The user that runs the server process (incl. sub-shell and ConTeXt)  
owns all the TeX files and the directory.

Maybe it's a Python problem, here's my call:
subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile,  

But I can call several other commands in this way without problems.
The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home.
Everything I call before ConTeXt shows up in the logfile.

Greetlings from Lake Constance!
https://www.cacert.org (I'm an assurer)

More information about the ntg-context mailing list