Change to argv[0] in recent snapshots (was RE: sig_send: wait for sig_complete event failed)
Mortimer, Andy
andy.mortimer@aeat.co.uk
Tue Sep 19 01:40:00 GMT 2000
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 <cgf@cygnus.com>
* spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the
full path when a script is detected. Suggested by Kazuhiro Fujieda
<fujieda@jaist.ac.jp>.
which is unfortunately earlier than the SEGV fix, which I'm guessing is the
following:
Fri Sep 15 22:30:40 2000 Christopher Faylor <cgf@cygnus.com>
* 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.mortimer@aeat.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@sourceware.cygnus.com
More information about the Cygwin
mailing list