delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/10/16:31:02

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 22:30:14 +0100
Lines: 71
Message-ID: <fm62p7$frr$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

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

> 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).

Hmm. So indeed run seems to use the Windows-API to create the new
rprocess. But that pdfetex knows, that is has been invoked by the name
pdflatex, must be an internal cygwin thing. Because actually, when
executing pdflatex from bash, cygwin must follow the symlink and then
executed pdfetex.exe. Still, cygwin reports to pdfetex, that it was
invoked with the command pdflatex.

So i have no clue where to start here.


Actually, i wrote a small C program. And sure, it will not hide the
console window, when startes. But it simply uses execve to start the
program given in the parameter list:

#include <stdio.h>
#include <unistd.h>

int main(int argc, char * argv[])
{
  if (argc < 2)
  {
    printf("you must give some parameters\n");
    return 1;
  }

  int i =3D execve(argv[1], argv+1, NULL);

  printf("execve failed: %i\n", i);
  return 2;
}



I'm amazed, it even works. Anyway: after compiling it under cygwin and
putting it to /bin/myrun.exe it's possible for me to successfully start
pdflatex by using

  c:\path\to\cygwin\bin\myrun.exe /usr/bin/pdflatex document.tex


Hmm. I'm not sure, in which troubles i get by going this way.





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

iD8DBQFHho5m7Ww7FjRBE4ARArMzAJ9Rk1vSA9RlSZkurgEQbeZpx+icTgCgleAd
VZvWz+X+FFPIqmLoSne9qxo=
=lhPm
-----END PGP SIGNATURE-----

--------------enig0ED546D6F2E526499D134A0D--

- Raw text -


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