Hi, Thanks for the info.. i executed shmat() using sys_ipc() which multiplexes all the ipc functions... thanks, raghu. On Mon, 28 Oct 2002, Ravi wrote: > > > I have written a daemon which creates a shared memory and puts in > > the data. Then i have a kernel module which is always installed > after > > starting the daemon. But when I try to access the shared memory that > > has been created using the daemon I am not seeing any data that has > > been put in by the daemon. > > Shared memory is for communicating between two user space processes. > It is the wrong approach if you want to pass data between user-space > and kernel-space. You should use a device interface or use /proc. > > > When i print the addresses of the shared memory I see > > different addresses. I am using the same key_t to in the kernel > > module ,which i used to create using the daemon, to access the > > shared memory. I am not understanding what is the problem... > > I am not sure how you executed the equivalent of shmat() in the > kernel module. Even if you did, it would execute in the context of > some process ('insmod' if you are doing this at module init time). > Once the process dies, the shared memory mapping is no longer valid. > This may be the reason why you don't see the expected data. > But as I said, you shouldn't be doing things this way. So don't > bother debugging it.. > > -Ravi. > > __________________________________________________ > Do you Yahoo!? > Y! Web Hosting - Let the expert host your web site > http://webhosting.yahoo.com/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/