Sunday, June 20, 2010

Permission denied of shmget

When using IPC::Shareable as a non-root user, sometimes got this:


IPC::Shareable::SharedMem: shmget: Permission denied


Just because shared memory is same as regular file. If someone has already created this "file", you can not create it with the same name ($glue) unless your are root.

So, whoever your are, please clean up this shm after you done with it.

(tied VARIABLE)->remove;
IPC::Shareable->clean_up;
IPC::Shareable->clean_up_all;


Refer to: perldoc IPC::Shareable

No comments:

Post a Comment