X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 10 Jan 2008 23:57:27 -0500 (EST) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: =?ISO-8859-1?Q?Sven_K=F6hler?= cc: cygwin AT cygwin DOT com Subject: Re: [BUG?] run.exe and pdflatex In-Reply-To: <4786B436.5030702@upb.de> Message-ID: References: <4786AC35 DOT 4030608 AT upb DOT de> <4786B436 DOT 5030702 AT upb DOT de> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1483920592-1200027447=:13638" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 ---559023410-1483920592-1200027447=:13638 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Fri, 11 Jan 2008, Sven Köhler wrote: > > Now, in Cygwin 1.7.x (a.k.a. CVS HEAD), this is no longer the case > > (since revision 1.243 of spawn.cc). The comment simply says "Drop > > pty_needs_alloc_console check" -- maybe Corinna can explain why it was > > dropped. So your program will not work as expected in the snapshots. > > OK, thanks for the explanation. > > But ... wouldn't that mean that any command executed would open a > console window? Yes, unless one is already allocated. So, when you run cygwin.bat, that opens the console, and this console is used for subsequent apps. However, if you tried to invoke a Cygwin application via Start->Run, you'd get a console. > In your other responses, you said, that using the shell is the most > preferrable way. Unfortunatly, i cannot use the shell. The method is > well understood. I could easily execute cygwin stuff by using: > > bash -c "exec \"\$0\" \"\$@\"" program param1 param2 ... > > The program from which i want to execute pdflatex/pslatex/etc. (which is > Texlipse, a Latex plugin for Eclipse) doesn't allow me to do so. Yet it would allow you to use run.exe in place of bash -c 'exec "$0" "$@"'? This is weird. > But aside from that: is the shell really the preferred way of doing > this? Doesn't the shell simply call execve again? Not quite. The shell will also set the right program name for executables/symlinks, or interpret the shebang line and invoke the interpreter via execve, rather than the script. > Following what you said, it should be best to call bash.exe from run.exe > to solve all the issues. Indeed. So, your invocation would be run bash -c 'exec "$0" "$@"' pdflatex your args or something like that. > So the question is: who does all the checks (shebang, etc.)? > - the execve implementation? (which is cygwin, right?) > - the shell? > - both? The shell. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "That which is hateful to you, do not do to your neighbor. That is the whole Torah; the rest is commentary. Go and study it." -- Rabbi Hillel ---559023410-1483920592-1200027447=:13638 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ---559023410-1483920592-1200027447=:13638--