[BUG?] run.exe and pdflatex

Sven Köhler skoehler@upb.de
Thu Jan 10 23:10:00 GMT 2008


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




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20080110/58edefd8/attachment.sig>


More information about the Cygwin mailing list