[NTG-context] calling ConTeXt as a background process

Taco Hoekwater taco at elvenkind.com
Fri Oct 8 15:54:05 CEST 2010


On 10/08/2010 03:47 PM, Henning Hraban Ramm wrote:
>
> 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/python
> /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn-settings.py
> 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex --interaction=batchmode
> --fmt=/var/opt/context/tex/texmf-cache/.../formats/cont-en
> --lua=/var/opt/context/tex/texmf-cache/...
> 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct>

Hm, defunct, eh?

The luatex binary itself definitely does not call uname as a
process, therefore this has to be the os.resultof() function
that Hans implements in l-os.lua. I am suspecting issues with
redirection now, as that function is defined as:

   function os.resultof(command)
     local handle = io.popen(command,"r")
     return handle and handle:read("*all") or ""
   end

and it is called like so:

   os.resultof('uname -m')

of course this will fail/block rather horribly if uname -m
does not write to STDOUT (and that is not just uname, thre
are a few more uses of os.resultof()).

Best wishes,
Taco


More information about the ntg-context mailing list