delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/10/15:48:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: =?ISO-8859-1?Q?Sven_K=F6hler?= <skoehler AT upb DOT de>
Subject: Re: [BUG?] run.exe and pdflatex
Date: Thu, 10 Jan 2008 21:47:08 +0100
Lines: 85
Message-ID: <fm608d$6ui$1@ger.gmane.org>
References: <fm5sat$o04$1 AT ger DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0801101505510 DOT 8742 AT access1 DOT cims DOT nyu DOT edu>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.14 (Windows/20071210)
In-Reply-To: <Pine.GSO.4.63.0801101505510.8742@access1.cims.nyu.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

--------------enig9F8B8062AA78CE7AA01D898B
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

>> so i have a latex file here. "pdflatex document.tex" works. But "run
>> pdflatex document.tex" does not.
>>
>> "run.exe" seems to be the best way to call cygwin application from
>> external windows apps. But the seems to be some difference from invoking
>> by a shell.
>>
>> pdfetex seems to check the name by it has been invoked. When invoking
>> from the shell, it correctly finds out, that it has been invoked as
>> "pdflatex" but when invoked via run.exe, this check seems to lead to the
>> wrong result.
>>
>> I guess, it's a bug of run.exe which might do more work, than it should
>> (like following symbolic links, or such stuff).
>=20
> This is not really a bug in run.exe, because it was never documented to
> work correctly with symlinks, and you'd get the same problem with any pure
> Windows way of invoking pdflatex anyway.  But it is, arguably, a
> deficiency in run.exe.

Hmm. I looked at the man pages, which says, that run's purpose is to
hide the console windows. Hmm. Maybe i'm kind of "misusing" the problem
right now.

But is there another easy way to execute cygwin programs from outside
cygwin? I think of symlinks, shell-scripts, perl-scripts, etc...
Using run.exe is quite handy for these cases.

> You can do a few things.  One is to pass an explicit parameter that tells
> pdfetex to use pdflatex mode (i.e., "-fmt pdflatex").

That's maybe a good idea - but won't work for pslatex, since pslatex is
a shell script.

>  Another is to
> invoke pdflatex via bash (i.e., "run bash -c 'pdflatex ...'").

Actually i HATE the bash -c "command param1 param2 ..." way of invoking
commands. It needs special escaping of white spaces and other special
characters, which usually nobody takes cares about causing unexpected
behaviour.
The way run.exe or sudo do it is much more elegant and transparent.

> Finally,
> you can look at the sources for run.exe (available via Cygwin setup) and
> submit a patch (look at the first argument to CreateProcess).

I'm not a unix-programmer unfortunatly. I'm not very familiar with the APIs.

Well, i will look into the source and try to find out, what run.exe is
actually doing. But CreateProcess sounds like a windows API call.
Wouldn't it be more elegant to use a cygwin-call similar to the one bash
uses?

But is run.exe linked against cygwin.dll?


--------------enig9F8B8062AA78CE7AA01D898B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHhoRM7Ww7FjRBE4ARAu9kAKChTvGdi4AeDM7VcV3ckDoxxx3lKQCfUut6
HuwmY+ga/xjVPaFTPbcTBAo=
=+ftr
-----END PGP SIGNATURE-----

--------------enig9F8B8062AA78CE7AA01D898B--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019