• Uncategorized

About c++ : After-update-glibc-to-version-234-semopen-failed-semopen-fail-Read-only-file-system

Question Detail

I am trying to update glibc to 2.34 for my system, then I came across the issue.

Test code:

#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <semaphore.h>
#include <stdlib.h>

int main(int argc, char** argv)
    if (2 != argc)
        printf("%s name\n", argv[0]);
        return -1;
    int flags = O_CREAT;
    const char* _name = argv[1];
    sem_t* _newsem = sem_open(_name, flags, 0666, 0);
    if (SEM_FAILED == _newsem)
        perror("sem_open fail");
        return -1;
    return 0;


# ./a.out /tmp
sem_open fail: Read-only file system

I have known that the glibc-2.34 have some changes on sem_open(): https://lwn.net/Articles/864920/

but I have no idea to fix the issue? If you have any suggestions ,pls help me.

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.