Click to See Complete Forum and Search --> : share memory problem


reza-ts
02-10-2006, 06:17 AM
Hi all,

When we build a big share memory with 'shmget' and 'shmat' functions, we have no problem in RedHat linux.
In Fedora 4 linux we get "Segmentation Fault" error with the same program. we must set
"ulimit -s unlimited" in every terminal console that we open.
Can anyone help me how can correct this problem permanently in fedora linux?


Thank you in-advance.

truls
02-10-2006, 09:08 AM
You could start by checking the return values of shmget and check what errno says. You get the segmentation fault because shmget is returning -1 when it faults, so if you check errno you will get an indication of what exactly the fault is. If you know exactly what the error is it's easier to help out.

ph34r
02-10-2006, 11:17 AM
Short term, you could add the ulimit command to /etc/profile