On 12/31/16, Paul Lambert <[email protected]> wrote: > I have observed that the file write mode of this function when using the > same file name a second time will delete the previous data in the file. > This is most likely accomplished by deleting the file and recreating a new > one. if so then this explains why the .output function locks up when using > a named pipe as the pipe is not responding to a delete command.
It just calls fopen(). http://www.sqlite.org/src/artifact/6095531aa9?ln=2609 I don't know what fopen() is doing behind the scenes. Probably it works differently on different systems, but I would have guessed that it just invoked open() with O_TRUNC. > > Pipes are files and the ability to launch an application and place a > pending read on the pipe is such that the system will block the read and > the application will hang on the read statement until something shows up. > In the case of a file this is not true. > > I believe this command needs to be modified so that it performs a "stat" to > determine if the target is a file or named pipe. If a named pipe then omit > the call to delete it. This function should additionally check to make > sure the target is a file and not a directory too as user typos will most > certainly lead to unknown results. > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

