Git Product home page Git Product logo

Comments (4)

debarshiray avatar debarshiray commented on September 13, 2024

I can reproduce this with:

/* gcc shm.c -lrt */

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>

int
main (void)
{
  int fd;

  fd = shm_open ("/foo", O_CREAT | O_RDWR, 0664);
  if (fd == -1)
    {
      fprintf (stderr, "shm_open failed: %s\n", strerror (errno));
      return 1;
    }

  close (fd);
  return 0;
}

However, this works:

🔹[rishi@toolbox ~]$ echo hello world >/dev/shm/bar
🔹[rishi@toolbox ~]$ ls -l /dev/shm
total 4
-rw-rw-r--. 1 rishi rishi 12 Nov  6 18:48 bar
🔹[rishi@toolbox ~]$ cat /dev/shm/bar
hello world

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

That tells me that open works, but shm_open doesn't, which is not suprising because /dev/shm doesn't seem to be on a tmpfs:

🔹[rishi@toolbox ~]$ df -h /dev
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            64M     0   64M   0% /dev
🔹[rishi@toolbox ~]$ df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p5  415G   28G  366G   7% /dev/shm

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

Does PR #12 fix the problem for you?

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

I am closing this issue because the above shm_open reproducer now works for me. Feel free to reopen or leave a comment if you have reason to think otherwise.

Either way, thanks for trying fedora-toolbox and getting in touch!

from toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.