This problem stems from the fact that isatty() is not reliable on Windows for 
non-cmd.exe
terminals. Postgres has the same problem, for what it is worth:

 http://archives.postgresql.org/pgsql-hackers/2005-09/msg01446.php

A commandline flag should probably be added to shell.c to force an interactive 
shell.

Also, it seems that stderr is buffered on non-cmd.exe shells on Windows. This 
is why the output of
commands (such as .help) is not immediately displayed. Here's an obvious 
workaround:

 /* for WIN32: first line in main() in shell.c */
 setvbuf(stderr, 0, _IONBF, 0);

With these changes (and disabling readline support) everything works fine on 
Windows for me.

--- [EMAIL PROTECTED] wrote:

> rahed <[EMAIL PROTECTED]> writes:
> 
> > Joe Wilson <[EMAIL PROTECTED]> writes:
> >
> >> I've seen this same behavior when running a MinGW-compiled sqlite3.exe in 
> >> the cygwin shell.
> It has
> >> something to do with the lack of flushing of information written to stdout 
> >> (until close()
> anyway).
> >> If you blindly type in the sqlite commands - it does work. Once you exit 
> >> the shell via .q you
> can
> >> see the entire output of the session.
> >>
> >> One workaround is to use a cygwin-compiled sqlite3.exe. Perhaps hacking 
> >> the sqlite shell not
> to
> >> buffer its console output would also do the trick.
> >>
> >
> > I entered the commands (which I didn't do before) and I can see the
> > output immediately. So the only hitch is a command line without a
> > prompt sqlite>. 
> 
> The shell likely does not believe that it is running interactively for some
> reason, and so is not presenting prompts.  Look at the documentation for the
> shell to figure out how to tell it to go into interactive mode.
> 
> Derrell
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to