Re: [sqlite] adding fdopen to VFS?

2011-03-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/01/2011 01:07 AM, Philip Graham Willoughby wrote: > I argue that this implies a problem in the Chromium sandbox rather than a > problem in the SQLite code. SQLite's implementation makes things worse because the xOpen implementation is not 5

Re: [sqlite] adding fdopen to VFS?

2011-03-01 Thread Philip Graham Willoughby
On 28 Feb 2011, at 20:38, Roger Binns wrote: >> Why is it not possible to create a custom VFS for the intended purpose >> and register it for the connections that need it? > > Because that custom VFS would be an almost duplicate of the existing VFS but > with a few key places changed. > > If

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 01:44 PM, Drake Wilson wrote: > I'm inclined to believe this nullifies the main argument against > forking os_unix.c in the absence of strong evidence to the contrary. Here are some broken things in VFS of varying severity where fixing

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Drake Wilson
Quoth Drake Wilson , on 2011-02-28 14:44:38 -0700: > Furthermore, another approach if the name<->FD thing is the only > requirement would be to retrieve all the original VFS methods at init > time (using sqlite3_vfs_find) and only alter a few of them when > registering the new

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Drake Wilson
Quoth Roger Binns , on 2011-02-28 13:03:43 -0800: > On 02/28/2011 12:41 PM, Drake Wilson wrote: > > Back on the original topic, I would rather think a custom VFS sounds > > like the way to go; > > It is technically correct that will work. However it is a *lot* of >

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 12:41 PM, Drake Wilson wrote: > Back on the original topic, I would rather think a custom VFS sounds > like the way to go; It is technically correct that will work. However it is a *lot* of maintenance work. The custom VFS would be a

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Drake Wilson
Quoth Roger Binns , on 2011-02-28 12:20:04 -0800: > You could do that in Unix in many years. I shipped product in 1994 that > used it extensively (a master daemon would use accept() and then pass the > new file handles to child processes as appropriate). > > "I_SENDFD" is

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 11:59 AM, Robert Hairgrove wrote: > I'm only beginning to delve into the possibilities offered by the VFS > API in SQLite. However, from what I have seen so far, it seems like a > very complete abstraction to me. For one thing a SQLite

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Jay A. Kreibich
On Mon, Feb 28, 2011 at 12:20:04PM -0800, Roger Binns scratched on the wall: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 02/28/2011 11:33 AM, Richard Hipp wrote: > > and then sends over a file descriptor using IPC. > You could do that in Unix in many years. Apache 1.x depended

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2011 11:33 AM, Richard Hipp wrote: > and then sends > over a file descriptor using IPC. (I didn't know you could do that in > unix. In fact, I bet it requires a linux-only extension of some kind. > Correct me if I'm wrong.) You could do

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Robert Hairgrove
On Mon, 2011-02-28 at 14:33 -0500, Richard Hipp wrote: > On Mon, Feb 28, 2011 at 1:00 PM, Paweł Hajdan, Jr. [many interesting things snipped ...] > wrote: > > What do you think about adding a call like below to the VFS interface? > > > > int (*xOpenWrapper)(const char

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Richard Hipp
On Mon, Feb 28, 2011 at 2:33 PM, Richard Hipp wrote: > > > On Mon, Feb 28, 2011 at 1:00 PM, Paweł Hajdan, Jr. < > phajdan...@chromium.org> wrote: > >> >> What do you think about adding a call like below to the VFS interface? >> >> int (*xOpenWrapper)(const char *path, int flags,

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Richard Hipp
On Mon, Feb 28, 2011 at 1:00 PM, Paweł Hajdan, Jr. wrote: > On Mon, Feb 28, 2011 at 15:12, Richard Hipp wrote: > >> On Mon, Feb 28, 2011 at 8:36 AM, Paweł Hajdan, Jr. < >> phajdan...@chromium.org> wrote: >> >>> >>> I remember a part of earlier discussion

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Paweł Hajdan , Jr .
On Mon, Feb 28, 2011 at 15:12, Richard Hipp wrote: > On Mon, Feb 28, 2011 at 8:36 AM, Paweł Hajdan, Jr. < > phajdan...@chromium.org> wrote: > >> >> I remember a part of earlier discussion that there is a problem with >> journal and possibly other auxiliary files, i.e. we can't

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Richard Hipp
On Mon, Feb 28, 2011 at 8:36 AM, Paweł Hajdan, Jr. wrote: > > I remember a part of earlier discussion that there is a problem with > journal and possibly other auxiliary files, i.e. we can't create/open them > just based on one file descriptor. > Right. If you call

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Paweł Hajdan , Jr .
2011/2/28 Richard Hipp > On Mon, Feb 28, 2011 at 7:39 AM, Paweł Hajdan, Jr. < > phajdan...@chromium.org> wrote: > >> I'd like to add an equivalent of fdopen to the sqlite's VFS ( >> http://www.sqlite.org/c3ref/vfs.html). The signature would similar to >> this: >> >> int

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Richard Hipp
On Mon, Feb 28, 2011 at 7:39 AM, Paweł Hajdan, Jr. wrote: > I'd like to add an equivalent of fdopen to the sqlite's VFS ( > http://www.sqlite.org/c3ref/vfs.html). The signature would similar to > this: > > int (*xFdOpen)(sqlite3_vfs*, int fd, sqlite3_file*, int flags, int