🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.database
Article #128

Re: Ingres question (Ingres and forked processes)

#128
From: Jeff Anton
Date: Mon, 26 Aug 1985 05:45
42 lines
2473 bytes
In article <2673@ihuxf.UUCP> mohan@ihuxf.UUCP (Palat) writes:
>	Consider the following:
>        An application opens an Ingres database through an
>	equel program. It then forks a child process.
>	1. Can the parent process fork a child with the
>	   database open?
>	2. If 1. can be done, is the database open to the child?
>	3. Again, if 2. can be done, are the ranges of the relations
>	   (##range) declared before the child was forked valid for the
>	   child too?
>
>	Mohan Palat 
>	AT&T Network Systems

1. Sure, you can fork.  However, the '## exit' will not return
until all the procs have closed their descriptors.  I'd suggect
not to put it in your programs.

2. If you do an exec then you've lost what file descriptors
talk to the backend.  Unless you're knowledgeable about equel
internals it's hopeless to talk to the backend after an exec.
I'm not sure but those file descriptors should be close on exec.
In the child before an exec you could conceivably talk sucessfully
to the backend IF ONLY ONE PROCESS USES THE BACKEND DURRING A XACT.
You could build some kind of locking convention yourself to allow this.
This is very shakey ground; I don't suggest this for the week of heart.

3. The 'range' statement just passes to the backend which remembers
it.  In this forked user process environment we have many procs at
one end of some pipes and the backend at the other end of those pipes,
If one proc changes a range variable all the user proc will be affected.

I can think of a few more problems that might occur.  Again, you'll
be exceeding the manufacturers recommendations doing this stuff
so don't attempt the above unless you understand what is going on.
-- 
C knows no bounds.
					Jeff Anton
					U.C.Berkeley
					Ingres Group
					ucbvax!anton
					anton@BERKELEY.EDU
Technical Details
Message-ID: <10201@ucbvax.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!anton
References: <2673@ihuxf.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!anton
From: anton@ucbvax.ARPA (Jeff Anton)
Newsgroups: net.database
Subject: Re: Ingres question (Ingres and forked processes)
Message-ID: <10201@ucbvax.ARPA>
Date: Mon, 26-Aug-85 01:45:05 EDT
Article-I.D.: ucbvax.10201
Posted: Mon Aug 26 01:45:05 1985
Date-Received: Tue, 27-Aug-85 01:18:52 EDT
References: <2673@ihuxf.UUCP>
Reply-To: anton@ucbvax.UUCP (Jeff Anton)
Distribution: net
Organization: University of California at Berkeley
Lines: 42