My kernel has System V IPC configured and I thought POSIX
Shared Memory is required for kernel 2.4.x.
Thanks
Did you mount /dev/shm?
--
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaa...@daimi.au.dk
Their business was zero and it was shrinking.
No I have not mounted /dev/shm. It doesn't exist already on my system
How is it created? mknod?
Thanks
Kevin
> Kevind wrote:
>>
>> I get the following error when trying to use shm_open
>> "Function not implemented"
>>
>> My kernel has System V IPC configured and I thought POSIX
>> Shared Memory is required for kernel 2.4.x.
>
> Did you mount /dev/shm?
It has nothing to do with /dev/shm, I don't have it on my system, but shared
memory works.
--
Greets
adeon
>
> I get the following error when trying to use shm_open
> "Function not implemented"
>
Could you show your code snip?
--
Greets
adeon
> It has nothing to do with /dev/shm, I don't have it on my system, but
> shared memory works.
I meant shared memory functions (ie. shm_open) work
--
Greets
adeon
You create it with mkdir, and then add this to your fstab:
none /dev/shm tmpfs rw 0 0
Also verify that tmpfs is actually listed in the list of
supported filesystems:
/proc/filesystems
I just tried unmounting /dev/shm on one system.
shm_open does give ENOSYS in that case.
I added the following line to the /etc/fstab
none /dev/shm tmpfs defaults 0 0
and mounted /dev/shm and it seemed to take it,
although there is still no shm in the dev directory.
I am getting a new shm_open error for /tmp/testshm: No such file or
directory. Although I am using O_CREATE? but I will
struggle a little while first and open a new thread if I need.
Thanks everyone.
Code snippet, someone may find it useful. I am starting with code from
W.R. Stevens Network Programming.
passed oflag = O_RDWR | O_CREAT | O_EXCL, FILE_MODE
if ( (fd = shm_open(pathname, oflag, mode)) == -1)
err_sys("shm_open error for %s", pathname);
return(fd);
I added the following line to /etc/fstab
none /dev/shm tmpfs defaults 0 0
and mounted /dev/shm.
I seemed to take the mount, although no /dev/shm exists.
I am getting a new shm_open error: No such file or directory even
though I am using O_CREAT. I will study this and open a new thread if
I can't figure it out.
I am starting with W.R. Stevens Network programming code and the snippet
is as follows.
int fd;
// the passed oflag = O_RDWR | O_CREAT | O_EXCL, FILE_MODE;
if ( (fd = shm_open(pathname, oflag, mode)) == -1)
err_sys("shm_open error for %s", pathname);
return(fd);
Thanks everyone.