On 12/5/2013 20:31, Stephen Chrzanowski wrote:
@Warren>
the package/sandbox idea won't work due to certain
constraints the OS puts on the file.

Quoting the Apple docs[1] Doug pointed to: "...you can access the document's contents using any appropriate file-system routines."

I'd like to see a simple C test case for whatever problem is claimed.

I'm not doubting you, exactly. File locking is a deep, tangled morass. But, it can sometimes be helpful to dive to the bottom of the swamp on things like this. Sometimes surprisingly simple solutions are found below the reeds, alligators and algae at the surface.

Being that I'm a Windows Only developer, I've never had to run into this
problem.  If something has its hand on the file, it holds it in place.

There are pluses and minuses to the Windows way of file locking. A lot of us in the Unix, Linux, BSD and OS X camps would say that the minuses outweigh the pluses.

<must resist advocacy rant>  <resist!>  <RESIST!>

File handling is NOT SQLites responsibility

I'm not sure about that. SQLite, at least at one time, was billed as a competitor for fopen() rather than for Oracle.

Maybe all that's needed is a mode where SQLite never creates any external files. Disable the WAL feature, don't create a lock file, etc. I think all the configuration options for this already exist. Has the OP tried disabling the interfering features?

On a personal note, I still cannot fathom why anyone would WANT to do file
management while working on an active document.

I do it frequently. It's one of the benefits you get from using a system that uses advisory locking by default.

For instance, I might have a program transcoding a movie from one digital video file format to another, and it decides to put the output next to the input file. If I actually wanted it to land somewhere else, I could:

a) Abort the transcode and hunt down the option that makes it put the output somewhere else; or

b) Just move the output file, knowing that as long as it stays on the same filesystem, the transcoder won't even notice the move.

This only works for files that won't be closed and then immediately reopened, requiring that the old path remain valid. It also requires that one file to be self-contained. Thus my suggestions above.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to