Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-25 Fir de Conversatie Fabian Greffrath
Am 24.10.2011 10:51, schrieb Fabian Greffrath: However, there are two more things that I don't understand in the face of your reply. And today I think I can give answer to both of my questions myself. It turns out to be a bit tricky to debug code by means of printf()s when you have just

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-24 Fir de Conversatie Fabian Greffrath
Dear Tony, Am 21.10.2011 16:15, schrieb Tony Mechelynck: Dos-style shells (COMMAND.COM, NDOS.COM, 4DOS.COM, cmd.exe, 4NT.EXE, etc.) open three handles (sysin, sysout and syserr) before starting a program, and they expect those same three handles still to be open when the program exits. They

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-24 Fir de Conversatie Fabian Greffrath
Am 22.10.2011 18:04, schrieb Bram Moolenaar: Perhaps a few #ifdefs will make the code work for MS-Windows. I do hope we can keep that to a minimum though, otherwise it gets messy. #ifdefs won't help, as the code is built in an UNIX-like environment (i.e. MSYS) but run in a cmd.exe window, so

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-22 Fir de Conversatie Bram Moolenaar
Fabian Greffrath wrote: Am 02.06.2011 17:07, schrieb Bram Moolenaar: Where does Vim crash when homedir is NULL? That should be fixed. I have investigated this crash a bit further and tailored it down to a completely unrelated issue. It is just that vim takes a completely different

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-21 Fir de Conversatie Fabian Greffrath
[Sent twice, sorry. First mail went to vim_dev@googlegroups.com. Which is the right address for the vim-dev list, actually?] Hi all, Am 02.06.2011 17:07, schrieb Bram Moolenaar: Where does Vim crash when homedir is NULL? That should be fixed. I have investigated this crash a bit further

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-21 Fir de Conversatie Fabian Greffrath
Hi all, Am 02.06.2011 17:07, schrieb Bram Moolenaar: Where does Vim crash when homedir is NULL? That should be fixed. I have investigated this crash a bit further and tailored it down to a completely unrelated issue. It is just that vim takes a completely different code path depending on

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-10-21 Fir de Conversatie Tony Mechelynck
On 21/10/11 13:47, Fabian Greffrath wrote: Hi all, Am 02.06.2011 17:07, schrieb Bram Moolenaar: Where does Vim crash when homedir is NULL? That should be fixed. I have investigated this crash a bit further and tailored it down to a completely unrelated issue. It is just that vim takes a

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-08 Fir de Conversatie Fabian Greffrath
Am 08.06.2011 07:13, schrieb Ben Schmidt: Can it be reproduced without Vim? If so, a bug can be filed against the shell. If not, perhaps we haven't fully understood it yet? No, I have not yet succeeded to reproduce this behaviour outside vim. If I run set HOME= sh -c unset nonomatch;

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-07 Fir de Conversatie Fabian Greffrath
Am 07.06.2011 05:40, schrieb Bram Moolenaar: This tries to expand a file pattern starting with ~/, which won't work when $HOME isn't set. However, it should not crash. You say the shell chokes on the command, but how does that make Vim crash? I don't know. Maybe it's just Windows that for

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-07 Fir de Conversatie Bram Moolenaar
fabian greffrath wrote: Am 07.06.2011 05:40, schrieb Bram Moolenaar: This tries to expand a file pattern starting with ~/, which won't work when $HOME isn't set. However, it should not crash. You say the shell chokes on the command, but how does that make Vim crash? I don't know.

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-07 Fir de Conversatie Ben Schmidt
On 8/06/11 2:38 PM, Bram Moolenaar wrote: fabian greffrath wrote: Am 07.06.2011 05:40, schrieb Bram Moolenaar: This tries to expand a file pattern starting with ~/, which won't work when $HOME isn't set. However, it should not crash. You say the shell chokes on the command, but how does

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-06 Fir de Conversatie Fabian Greffrath
Am 02.06.2011 17:07, schrieb Bram Moolenaar: It's perfectly OK for homedir to be NULL. Setting it to any random directory is not a good idea. You are perfectly right! I have copied MSYS's vim.exe (and the dynamic libs it depends on) into a separate directory. In a cmd.exe shell, I chdir

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-06 Fir de Conversatie Fabian Greffrath
Am 06.06.2011 14:22, schrieb Fabian Greffrath: However, since vim starts without crashing when HOME is unset and sh.exe is *absent*, I think it's not an issue in vim.exe itself, but maybe in the way it invokes the shell. The sh.exe I just copied over from MSYS starts just fine even if HOME is

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-06 Fir de Conversatie Bram Moolenaar
Fabian Greffrath wrote: Am 06.06.2011 14:22, schrieb Fabian Greffrath: However, since vim starts without crashing when HOME is unset and sh.exe is *absent*, I think it's not an issue in vim.exe itself, but maybe in the way it invokes the shell. The sh.exe I just copied over from MSYS

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-02 Fir de Conversatie Bram Moolenaar
Fabian Greffrath wrote: Am 31.05.2011 11:16, schrieb Gary Johnson: Under what conditions does yours crash? Plain vim.exe from MSYS executed in a cmd.exe shell. I have seen something similar to your observations: If I unset HOME in cmd.exe (via set HOME=) and then run vim.exe from

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-06-01 Fir de Conversatie Fabian Greffrath
Am 31.05.2011 11:16, schrieb Gary Johnson: Under what conditions does yours crash? Plain vim.exe from MSYS executed in a cmd.exe shell. I have seen something similar to your observations: If I unset HOME in cmd.exe (via set HOME=) and then run vim.exe from MSYS, it crashes. If I first run

HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-05-31 Fir de Conversatie Fabian Greffrath
Hi vim, I have currently experienced crashes with vim binaries which got compiled in MSYS, i.e. an UNIX-like environment, but executed in a cmd.exe shell. The MSYS compiler identifies itself as a UNIX compiler, i.e. it has unix, __unix and __unix__ defined. In a UNIX environment, one can

Re: HOME variable in cmd.exe for vim compiled in an UNIX-like environment

2011-05-31 Fir de Conversatie Gary Johnson
On 2011-05-31, Fabian Greffrath wrote: Hi vim, I have currently experienced crashes with vim binaries which got compiled in MSYS, i.e. an UNIX-like environment, but executed in a cmd.exe shell. The MSYS compiler identifies itself as a UNIX compiler, i.e. it has unix, __unix and