John Granieri (granieri++at++babar.cis.upenn.edu)
Thu, 04 Nov 93 16:27:44 -0500
I'm trying to use a datapool between two unrelated processes (one is
just a slightly modified version of perfly, the other is a 3D GL
program). My problem is this:
the perfly process creates the datapool correctly, but the other
process can't attach to it. errno is "Device or resource busy" after
calling pfAttachDPool in the other process.
Here's the code:
in modified perfly:
....
/* create shared memory */
jackpool = pfNewDPool(32*1024, "jackperf");
jackup = (JackUpdate*)pfDPoolAlloc(jackpool,sizeof(JackUpdate), 1);
jackup->frame = -1;
jackfigs = (FigureUpdate*)pfDPoolAlloc(jackpool,
sizeof(FigureUpdate)*MAX_FIGURE, 2);
jackjoints = (JointUpdate*)pfDPoolAlloc(jackpool,
sizeof(JointUpdate)*MAX_JOINT, 3);
pfDPoolUnlock((void*)jackup);
pfDPoolUnlock((void*)jackfigs);
pfDPoolUnlock((void*)jackjoints);
This seems to work, and the arena file is created rw-rw-rw- in
/usr/tmp
Then, in other process: (the other process is a GL-based program, with
it's own run-time database, not using Performer)
static int p=0;
if (!p) {
pfInit();
p = 1;
}
if ((jackpool=pfAttachDPool("jackperf"))==NULL) {
printf("\ncan't attach to performer datapool\n");
return 0;
}
It never attaches, even after repeatedly calling the above code. Any
ideas?
Thanks
-John
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:05 PDT