5 void *shmat(int shmid, const void *shmaddr, int shmflag)
8 static void *(*shmat_orig)(int , const void *, int );
11 h = dlopen("/lib/libc.so.6", RTLD_LAZY);
12 shmat_orig = dlsym(h, "shmat");
13 count = atoi(getenv("SHMAT_COUNT"));
16 fprintf(stderr,"shmat(%d, %p, 0x%x)\n", shmid, shmaddr, shmflag);
18 if (! count) return NULL;
22 return shmat_orig(shmid, shmaddr, shmflag);