Each child should have its own transaction, but only if it has initiated
its own DB connection. If the children do not do that, then life gets
problematic, and child A could conceivably rollback child B's work,
and the parents work, and so on. Or commit that work! Look up the
sqlbreak, sqldetach, sqlexit functions in chapter 9 of the 6.0 ESQL/C
manual.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
}From ilist@rmy.emory.edu Thu Apr 20 07:28:07 1995
}From: timward@crl.com (Timothy E. Ward)
}Subject: TRANSACTIONS and fork() in esql/c
}Date: 19 Apr 1995 13:45:14 -0700
}To: informix-list@rmy.emory.edu
}X-Informix-List-To: eu-informix-distr@inflon.informix.com
}X-Informix-List-Id: <news.13180>
}
}Hello:
}
}We are using Online 6.0 and ESQL/C under AIX.
}
}My question is: When utilizing TRANSACTIONS
}under ESQL/C
}(ie. "EXEC SQL define TRANS;")....
}
}When a process spawns multiple "children" processes
}(by way of "fork()"), what is the relationship of the
}"children" processes to the TRANSACTION. For example,
}if child "A" performs a rollback, does this cause a
}rollback of all uncommitted database updates for *all*
}other children as well?
}(and for the parent process too, for that matter).
}
}For a description of TRANSACTIONS, see Informix Guide to SQL
}Tutorial ver 6.0, page 4-23)
}
}Thanks for your help. ... Tim
}
}|----------***** S O L U T I O N S * T H A T * W O R K *****----------|
}| Tim Ward | The Procyon Group |
}| timward@crl.com | 475 Sansome St., Suite 800 |
}| (415) 677-0140 FAX: (415) 362-4832 | San Francisco, Ca 94111 |
}