Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runcommand.sh: does not capture logs when /dev/shm is unavailable or restricted #3554

Open
twojstaryzdomu opened this issue Jun 15, 2022 · 6 comments

Comments

@twojstaryzdomu
Copy link

/dev/shm isn't traditionally the location to dump data to. On some environments it may not be available (it is after all an in-memory shared location). Please enable logs to be written elsewhere (/tmp) if /dev/shm isn't available.

@cmitu
Copy link
Contributor

cmitu commented Jun 15, 2022

This is by design - a memory backed location was chosen in order to prevent writing to the sdcard on the Pi (the primary usage for RetroPie).
From the systems that RetroPie supports, is there a distro where /dev/shm is not available and writable ?

@twojstaryzdomu
Copy link
Author

twojstaryzdomu commented Jun 15, 2022

From the systems that RetroPie supports, is there a distro where /dev/shm is not available and writable?

I do not question the intent. It's all very well and in fact what most users want, not to write to flash too often.

I question the code - do you need to hard-code /dev/shm every time in your script? Why not define it via a variable and set it at the top of the script, enabing an easy change to a different location.

Let me give you another scenario: my game crashes the box and I would like it to capture output to disk. Nothing you write to memory would be preserved across crashes. Or memory saving - /dev/shm takes precious memory on environments where RAM is non-expandable and is a luxury. Do you understand both cases?

For both cases, here's what could be done to improve runcommand.sh: #3555.

@joolswills
Copy link
Member

I think it would just be simpler to allow this to be set in the runcommand configuration file - your change is just hardcoding more locations. I don't think it's a big issue though. I can make a suitable change.

@twojstaryzdomu
Copy link
Author

I think it would just be simpler to allow this to be set in the runcommand configuration file - your change is just hardcoding more locations. I don't think it's a big issue though. I can make a suitable change.

Very well but you haven't got rid of the hard-coded /dev/shm that are all over the place in runcommand.sh.

@joolswills
Copy link
Member

I missed two references which I will fix.

@twojstaryzdomu
Copy link
Author

I missed two references which I will fix.

Thanks! Please see #3557, I think it's only fair that it's a value that a user may modify easily via the menu like the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants