zhangkeqi84 wrote: > Using your System() for a project, I find a bug about the share memory.
You have sent your message to the GNU Coreutils mailing list. The GNU Coreutils are the basic file, shell and text manipulation utilities of the GNU Operating System. You can learn more about GNU Coreutils here: http://www.gnu.org/software/coreutils/ The GNU Coreutils are part of the GNU Operating System. You can learn more about the GNU Project here: http://www.gnu.org/ But you are talking about an error in a C program which is apparently a C program that you have written and this is not a general C programming support forum. I do not know where to suggest you to look for more help. Very sorry. Bob > The share memory in your system working like this: > the A,B process: > A create the share memory using the struct temp: > strcut temp > { > char *p; > char ch; > }; > p = &ch; > ch = 'a'; > > the share memory will be like this: > addr data content > .... > 0x0F00AB00 (p)0x0F00AB04 > 0x0F00AB04 (ch)'a' > .... > if process B get the same Share memory with shmat(shmid,0,0); > > like this > > addr data content > 0x0D002400 (p)0x0F00AB04 > 0x0D002404 (ch) 'a' > > Using the p in process B, maybe I will get a “segmentation fault” > > if process B get the same Share memory with > shmat(shmid,addr,SHM_REMAP); //addr is the address of share memory of A; > sometimes i will get the segmentation fault in the sentence(shmat) and > process dump; > > > It's very nice that if you can solve this problem asap! > > > YOURS > > keqi zhang > > > 2007 11 13 > > > > > > > > > _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
