This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] cygwin-apps/run 1.0.3

Follow-up to run 1.0.3 crashing and leaving run.exe.stackdump, first
reported at

The list wouldn't let me send a patch because it had an email address in
the Changelog, so I had to put it here:

The first fix is much like the above, but instead simply changes < to <=
to also copy the extra NULL terminator sentinel in the argv array, which
was needed to avoid deleting random memory.

The second fix adds quotes around parameters so spaces in the original
arguments don't get mistaken as separate arguments.  For example this
original test case:

    run bash --login -i -c "emacs FILENAME"

Get executed internally within run as this without quotes:

    bash --login -i -c emacs FILENAME

Without reinstating the quotes emacs runs with no arguments and FILENAME
is lost by bash.

Debug output (--run-debug=3) excerpt from two commands showing how
quotes are now added:

run DEBUG: C:\Apps\Cyg\bin\bash.exe --login -i -c emacs FILENAME

run DEBUG: C:\Apps\Cyg\bin\bash.exe "--login" "-i" "-c" "emacs FILENAME"

Side note: If you ask me why I'm running bash as a login shell to run
emacs-w32, it's to get all my .bash_profile settings when launched from
a Windows shortcut.  Paths and env vars and other things work better.
The side effect is that bash is a parent of emacs-w32 but that's okay
because there is no console window.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]