ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Florian Wobbe <Florian.Wobbe@awi.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: calling ConTeXt as a background process
Date: Thu, 07 Oct 2010 18:32:09 +0200	[thread overview]
Message-ID: <B1B7AE45-F9E4-4709-BCC4-7F179D3F9FA7@awi.de> (raw)
In-Reply-To: <48470924-D44D-4010-B895-12EA664C4D90@fiee.net>

> 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
___________________________________________________________________________________


  reply	other threads:[~2010-10-07 16:32 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  7:06 Henning Hraban Ramm
2010-10-07  7:34 ` Henning Hraban Ramm
2010-10-07  8:42   ` Taco Hoekwater
2010-10-07  9:00     ` Henning Hraban Ramm
2010-10-07  9:06       ` Taco Hoekwater
2010-10-07 10:19         ` Henning Hraban Ramm
     [not found]           ` <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de>
2010-10-07 15:55             ` Henning Hraban Ramm
2010-10-07 16:32               ` Florian Wobbe [this message]
2010-10-08  7:36                 ` Henning Hraban Ramm
2010-10-08  7:59                   ` Florian Wobbe
2010-10-08  8:43                     ` Henning Hraban Ramm
2010-10-08  9:25                       ` Florian Wobbe
2010-10-08 10:00                         ` Henning Hraban Ramm
2010-10-08 11:46                           ` Florian Wobbe
2010-10-08 13:47                             ` Henning Hraban Ramm
2010-10-08 13:54                               ` luigi scarso
2010-10-08 13:54                               ` Taco Hoekwater
2010-10-08 14:22                                 ` Patrick Gundlach
2010-10-08 14:30                                 ` Henning Hraban Ramm
2010-10-08 14:57                                   ` Taco Hoekwater
2010-10-08 15:10                                     ` Hans Hagen
2010-10-08 15:08                                   ` Florian Wobbe
2010-10-08 19:44                                     ` calling ConTeXt as a background process (SOLVED) Henning Hraban Ramm
2010-10-10  8:47                                       ` Patrick Gundlach
2010-10-10  9:01                                         ` Henning Hraban Ramm
2010-10-26 19:28                                       ` Taco Hoekwater
2010-10-26 20:09                                         ` Hans Hagen
2010-10-26 20:56                                           ` Taco Hoekwater
2010-10-26 21:32                                             ` Hans Hagen
2010-10-26 20:13                                         ` Henning Hraban Ramm
2010-10-08 15:05                                 ` calling ConTeXt as a background process Henning Hraban Ramm
2010-10-07 18:16               ` taco
2010-10-08  8:00                 ` Henning Hraban Ramm
2010-10-08  8:12                   ` Patrick Gundlach
2010-10-08  9:21                     ` Henning Hraban Ramm
2010-10-08  9:27                       ` luigi scarso
2010-10-08  8:37                   ` luigi scarso
2010-10-08  8:47                     ` Henning Hraban Ramm
2010-10-08  8:54                       ` luigi scarso
2010-10-08 10:19                   ` Hans Hagen
2010-10-07 10:16       ` Robin.Kirkham
2010-10-07 11:02         ` Henning Hraban Ramm
2010-10-07 10:27       ` Patrick Gundlach
2010-10-07 15:44         ` Henning Hraban Ramm
2010-10-07 15:48           ` luigi scarso
2010-10-07 16:15             ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1B7AE45-F9E4-4709-BCC4-7F179D3F9FA7@awi.de \
    --to=florian.wobbe@awi.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).