Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <13179A03C694D211B84700105A1E6C8B2FCFC2@cfx-server.cfds.harwell.aeat.co.uk> From: "Mortimer, Andy" To: "'cygwin AT sources DOT redhat DOT com'" Subject: Change to argv[0] in recent snapshots (was RE: sig_send: wait for sig_complete event failed) Date: Tue, 19 Sep 2000 09:37:08 +0100 Mime-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Hi List, Chris Faylor writes: > I've made a change to recent snapshots which will cause > cygwin to core dump > in this situation rather than try to send a signal to itself > which is never > caught. > > If you have the time, please try out a snapshot. I tried out a new snapshot last night (from Sep 17), and unfortunately a change which has gone back since the 1.1.4 release seems to have broken the (fairly popular, in my experience at least) idiom for scripts which have associated data files: SCRIPT_ROOT=`dirname $0` Witness: [1]:~$ cat /tmp/test.sh #!/bin/sh echo $0 echo `dirname $0` pwd [1]:~$ /tmp/test.sh C:\cygwin\tmp\test.sh . /cygdrive/u While I can certainly see the advantages of having $0 as a Windows path when calling non-Cygwin interpreters, I would respectfully request that this change be reconsidered. The other alternative, I guess, is to fix up argv[0] when a Cygwin process is started, which might be the best of both worlds. I'm sure you guys can think of something, anyway! ;-) This is mostly a heads-up; I certainly understand that these are development releases, and I can expect breakage, but hopefully this issue will be resolved before the next release. I'm assuming this is caused by the following change from the Sep 13 snapshot: Wed Sep 13 10:26:16 2000 Christopher Faylor * spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the full path when a script is detected. Suggested by Kazuhiro Fujieda . which is unfortunately earlier than the SEGV fix, which I'm guessing is the following: Fri Sep 15 22:30:40 2000 Christopher Faylor * exceptions.cc (handle_exceptions): Just "core dump" if SIGSEGV in signal thread. Because my scripts do indeed depend on this idiom (how did you guess? ;-), I'll try to extract just the patch referred to and apply it to 1.1.4 for testing, and let the list know how it goes with the original problem. Thanks for the reply! Andy -- Andy Mortimer, CFX-5 Architecture and Infrastructure Team andy DOT mortimer AT aeat DOT com *********************************************************************** This transmission contains information which may be confidential and which may also be privileged. It is intended for the named addressee only. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please contact the sender. Thank you for your cooperation. *********************************************************************** For more information about AEA Technology please visit our website at http://www.aeat.co.uk AEA Technology plc registered office 329 Harwell, Didcot, Oxfordshire OX11 0QJ. Registered in England and Wales, number 3095862. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com