Re: shared memory

[prev] [thread] [next] [Date index for 2005/03/16]

From: Perrin Harkins
Subject: Re: shared memory
Date: 00:50 on 16 Mar 2005
On Tue, 2005-03-15 at 19:40 -0500, jonathan vanasco wrote:
> On Mar 15, 2005, at 7:30 PM, Perrin Harkins wrote:
> 
> > Don't fork with an open database connection and then try to use it.  It
> > will not work.
> 
> Really?  I figured that it  would work just right -- except whatever 
> you programmed to use that will crash and burn and time out waiting to 
> access the single shared handle.

That would imply that there's built-in mechanism for sharing things
safely between processes.  There isn't.

There are things in DBI to catch this mistake now, which will give you
an error messages about PIDs not mathcing.  Before, it would have just
given you crazy messages about socket errors and incorrect results.

> I should have explained that I was just trying to illustrate the 
> concept , should I ?

Okay, but copy-on-write sharing is a transparent process that has no
effect on the behavior of your program.  It isn't the same as processes
cooperating to avoid concurrent use of the same database handle, like
you describe above.

I just want to make it very clear to people that they should not fork
with an open db handle and then try to use it.

- Perrin

(message missing)

shared memory
=?ISO-8859-1?Q?Andr=E9_Warnier?= 16:35 on 15 Mar 2005

Re: shared memory
Jonathan Vanasco 16:37 on 15 Mar 2005

Re: shared memory
=?ISO-8859-1?Q?Andr=E9_Warnier?= 17:07 on 15 Mar 2005

Re: shared memory
=?ISO-8859-1?Q?Andr=E9_Warnier?= 22:53 on 15 Mar 2005

Re: shared memory
Martin Moss 17:47 on 15 Mar 2005

Re: shared memory
Perrin Harkins 18:04 on 15 Mar 2005

Re: shared memory
Jonathan Vanasco 19:11 on 15 Mar 2005

Re: shared memory
Perrin Harkins 19:48 on 15 Mar 2005

Re: shared memory
Dan Sully 19:53 on 15 Mar 2005

Re: shared memory
jonathan vanasco 00:30 on 17 Mar 2005

Re: shared memory
Jonathan Vanasco 20:05 on 15 Mar 2005

Re: shared memory
Perrin Harkins 20:14 on 15 Mar 2005

Re: shared memory
=?ISO-8859-1?Q?Andr=E9_Warnier?= 22:26 on 15 Mar 2005

Re: shared memory
Perrin Harkins 22:31 on 15 Mar 2005

Re: shared memory
=?ISO-8859-1?Q?Andr=E9_Warnier?= 23:26 on 15 Mar 2005

Re: shared memory
Jonathan Vanasco 23:40 on 15 Mar 2005

Re: shared memory
Eric Wilhelm 23:50 on 15 Mar 2005

Re: shared memory
Perrin Harkins 00:29 on 16 Mar 2005

Re: shared memory
Scott Gifford 03:29 on 16 Mar 2005

Re: shared memory
William McKee 14:36 on 18 Mar 2005

Re: shared memory
Perrin Harkins 00:30 on 16 Mar 2005

Re: shared memory
jonathan vanasco 00:40 on 16 Mar 2005

Re: shared memory
Perrin Harkins 00:50 on 16 Mar 2005

Re: shared memory
Ofer Nave 01:20 on 16 Mar 2005

Re: shared memory
jonathan vanasco 01:56 on 16 Mar 2005

Re: shared memory
Perrin Harkins 01:06 on 17 Mar 2005

Generated at 16:59 on 18 Mar 2005 by mariachi v0.52