From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62434 Path: news.gmane.org!not-for-mail From: Florian Wobbe Newsgroups: gmane.comp.tex.context Subject: Re: calling ConTeXt as a background process Date: Thu, 07 Oct 2010 18:32:09 +0200 Message-ID: References: <4CAD8800.2010909@elvenkind.com> <4CAD8D8A.6040802@elvenkind.com> <5A1428AE-DA31-4120-9B35-102E7B42D8AC@fiee.net> <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de> <48470924-D44D-4010-B895-12EA664C4D90@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286469175 26990 80.91.229.12 (7 Oct 2010 16:32:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2010 16:32:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 07 18:32:39 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 1P3tOV-0004Kj-6U for gctc-ntg-context-518@m.gmane.org; Thu, 07 Oct 2010 18:32:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3D45ACA731; Thu, 7 Oct 2010 18:32:34 +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 D+ibXlW46ICV; Thu, 7 Oct 2010 18:32:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C93C0CA71E; Thu, 7 Oct 2010 18:32:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 06C01CA71E for ; Thu, 7 Oct 2010 18:32:29 +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 fGHRc1ceHxZf for ; Thu, 7 Oct 2010 18:32:16 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 8A198CA70D for ; Thu, 7 Oct 2010 18:32:16 +0200 (CEST) Original-Received: from mails3.awi.de (mails3.AWI.DE [134.1.2.14]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o97GWFLm012262 for ; Thu, 7 Oct 2010 18:32:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by mails3.awi.de (Postfix) with ESMTP id BCF74A1BF3 for ; Thu, 7 Oct 2010 18:32:14 +0200 (MEST) X-Virus-Scanned: amavisd-new at awi.de Original-Received: from localhost ([127.0.0.1]) by localhost (mails3.awi.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id F-LaGflNqlYF for ; Thu, 7 Oct 2010 18:32:09 +0200 (MEST) Original-Received: from msg.awi.de (msg.AWI.DE [134.1.3.16]) by mails3.awi.de (Postfix) with ESMTP id 416C6A1BCE for ; Thu, 7 Oct 2010 18:32:09 +0200 (MEST) Original-Received: from vpn-awinet-16-32.awi.de ([unknown] [172.28.16.32]) by msg.awi.de (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with ESMTPSA id <0L9X0079UHXLZNF0@msg.awi.de> for ntg-context@ntg.nl; Thu, 07 Oct 2010 18:32:09 +0200 (MEST) In-reply-to: <48470924-D44D-4010-B895-12EA664C4D90@fiee.net> X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=134.1.2.14; country=DE; region=03; city=Bremerhaven; latitude=53.5500; longitude=8.5833; http://maps.google.com/maps?q=53.5500,8.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xDfQwffl - a674928a9c87 - 20101007 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:62434 Archived-At: > Am 2010-10-07 um 12:54 schrieb Florian Wobbe: > >> On Oct 7, 2010, at 12:19 , Henning Hraban Ramm wrote: >> >>> Am 2010-10-07 um 11:06 schrieb Taco Hoekwater: >>>>> Of course, prd_paket.tex is my input file. But that's there. >>>> >>>> Your shell quotes were off. It is looking for >>>> >>>> "./prd_paket --batchmode --once.tex" >>> >>> Ok, but it doesn't work with any other call of luatex - I also tried to start another shell script that calls luatex, but it hangs in the same manner. If I kill the luatex process, further commands work. >> >> could you send me the calling shell script along with all necessary files to run the context batch? or supply a minimal example instead of prd_paket.tex. > > Hi Florian, > > it doesn't depend on the tex file, it's the same with > > \starttext > Hello World! > \stoptext > > It also doesn't depend on context options (--batchmode etc.) > > And it doesn't seem to depend on the way of calling it from Python/Django: > - directly with subprocess.Popen (several options), subprocess.call, subprocess.check_call > - indirectly via shell script (that contains just the context call) > - with context or mtxrun (didn't try texlua directly yet) > - with setuptex or setting TEXROOT and TEXMFOS directly (in the environment for the subprocess call) > > I can imagine that it has something to do with SElinux settings, didn't dive in that yet. > > I can call context manually as the same user that's running the server process with all the options. > > It also works on my test system (osx-intel) with Django's dev server, just not on my Ubuntu server (linux-64). Well, remote sensing with computers is cumbersome and as I haven't got a clue what happens on your machine I'd rather see your the shell script. How is this script intended to be called: as a subshell from the prompt, as a cron job in the background, ...? I've got Ubunto and OSX here and could try to reproduce the error for you, if you post your script. A shell script with just these 4 lines #!/bin/bash cd $HOME/context/tests export PATH=$PATH:$HOME/applic/context/tex/texmf-linux-64/bin context --batchmode test.tex works as expected on Ubunto 2.6.32-24-server x86_64 with an almost empty environment (none of the TEX* variables set). You just have to set the path to context - nothing else is necessary. As for the environment variables set: you can test for that in the script via 'env' and redirect the output to a file. Cheers, Florian ___________________________________________________________________________________ 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 ___________________________________________________________________________________