From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62412 Path: news.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: calling ConTeXt as a background process Date: Thu, 7 Oct 2010 09:06:17 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286435211 23354 80.91.229.12 (7 Oct 2010 07:06:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2010 07:06:51 +0000 (UTC) To: mailing ConTeXt users list for Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 07 09:06:49 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P3kYw-0003xz-HA for gctc-ntg-context-518@m.gmane.org; Thu, 07 Oct 2010 09:06:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5FDECA721; Thu, 7 Oct 2010 09:06:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sOFDQBelrqc8; Thu, 7 Oct 2010 09:06:34 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E44E4CA709; Thu, 7 Oct 2010 09:06:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0F4C7CA709 for ; Thu, 7 Oct 2010 09:06:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GkR1UvO0Iah9 for ; Thu, 7 Oct 2010 09:06:20 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 6755ACA707 for ; Thu, 7 Oct 2010 09:06:20 +0200 (CEST) Original-Received: from turan.fiee.net (turan.fiee.net [87.230.77.106]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9776JRs013278 for ; Thu, 7 Oct 2010 09:06:19 +0200 X-No-Auth: unauthenticated sender Original-Received: from turan.fiee.net (lvps87-230-77-106.dedicated.hosteurope.de [127.0.0.1]) by turan.fiee.net (Postfix) with ESMTP id DB62C35D4402C for ; Thu, 7 Oct 2010 09:06:18 +0200 (CEST) Original-Received: from [10.128.9.9] (89-117.77-83.cust.bluewin.ch [83.77.117.89]) by turan.fiee.net (Postfix) with ESMTP for ; Thu, 7 Oct 2010 09:06:18 +0200 (CEST) X-Mailer: Apple Mail (2.936) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=87.230.77.106; country=DE; region=07; city=Host; latitude=51.6500; longitude=6.1833; http://maps.google.com/maps?q=51.6500,6.1833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06DfH6jXO - 7a512d475090 - 20101007 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62412 Archived-At: 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] 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: PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/ usr/X11R6/bin TEXMFOS=/var/opt/context/tex/texmf-linux-64 TEXROOT=/var/opt/context/tex 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, stdout=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! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________