Re: Posix shared memory problem

On Sat, May 09, 2009 at 08:31:15PM +0200, Lothar Scholz wrote:
Thanks for solving the posix semaphore problem. But with shared memory
there comes the next issue:

int main() {
int m;
m = shm_open("/barfoo", O_RDWR|O_CREAT|O_EXCL, S_IRWXU);
if (m == 1) perror("shm_open error");

i always get permission denied error, and i tried many values
for flags and mode? I can only get this working as root but not
as a normal user.

shm_open/shm_unlink refer to the filesystem; they are fairly direct
wrappers around open and unlink.

POSIX suggests making the pathname a configuration option;
alternatively, using a directory for temporary files such as /tmp could

Jilles Tjoelker
freebsd-arch@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • Re: [opensuse] Post installation queries (FIRST successful installation of Linux)
    ... permission from your *normal user* account by exercising root privileges ... user to root. ...  Done with sudo! ...   i - puts vi in insert mode ...
  • Re: user privledges
    ... > redhat 7.2 i created a user account for myself to use on a daily basis. ... > fare i have just been su - and entering the root pass. ... it started but would not install because i did ... sofware to /opt/musicmatch as a normal user. ...
  • Re: jail() House Rock
    ... Think carefully about exactly what kind of privileges your clients get. ... normal user account on the main server, and root inside the jail. ...
  • Re: [SLE] Firefox, fixed and broken again.... :-(
    ... >> through KDE as root but not as a normal user. ... But if it works for root, not for user, I ... I opened Firefox it opened fine. ... I then tried opening Firefox again - remember it ...
  • Re: GUI login screen.
    ... Well i think the best solution to get around this is to setup a normal user account... ... then edit the /etc/passwd file and set that person with root permissions so as soon as they login theyre automatically made root. ...