Title: RE: [HACKERS] psql \e broken again

From: Zeugswetter Andreas DAZ SD [mailto:[EMAIL PROTECTED]]
>
> I am not sure the test is valid, since %EDITOR% was used on
> the command line,
> which does it's own magic on quotes. Is there a command that
> would use the
> envvar EDITOR without putting it on the commandline ?
>
> We are talking about directly using the envvar from inside
> the program, no?
>

I wasn't sure either, but a quick trudge through my Windows-installed software that has been ported from *nix didn't show any programs that attempted to preserve that aspect of their behavior. CVSNT at least attempted to invoke an external editor, so I tested with that.

I like Kevin Brown's suggestion of writing out a temporary .txt file and 'executing' it. It will follow the principle of least suprise for Windows users. And it is suprisingly easy to wait for a child process with the NT API. WaitForSingleObjectEx() ( http://tinyurl.com/5d4tj ) will wait with a timeout, so the caller can handle other messages or update counters as needed. ( We usually timeout every 1000ms and repeat the call until it returns a non-timeout status. )

Reply via email to