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

use a wildcard for the killall command to support current and legacy versions of retropie #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ds17f
Copy link

@ds17f ds17f commented May 11, 2020

This PR addresses issue #82

The latest pre-made image of RetroPie, v4.6 – released April 28, 2020, has trouble with the shutdown script. It appears that the killall command fails because the emulationstation process is no longer identified by emulationstation but instead by its truncated, 15 character name, emulationstatio.
(see more here: https://linux.die.net/man/1/killall, specifically

If a command name is longer than 15 characters, the full name may be unavailable (i.e. it is swapped out).

I'm not entirely sure what brings about this change, but it's there none the less.

I first tried to use pkill to deal with this but the calling python script hangs and shutdown never occurs.

I next tried shortening the killall to killall emulationstatio, but this fails on my RetroPie 4.4 build which is my current daily driver.

In the end, I settled on using the -r flag and wildcarding any characters past the known 15 (emulationstatio). This works correctly on 4.6 and on 4.4.

Copy link

@mmvanheusden mmvanheusden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

@@ -11,7 +11,7 @@

#functions that handle button events
def when_pressed():
os.system("sudo killall emulationstation && sleep 5s && sudo reboot")
os.system("sudo killall -r emulationstatio* && sleep 5s && sudo reboot")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm new on github

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, Sorry

@ds17f
Copy link
Author

ds17f commented May 11, 2020

I tried changing this file, rebooted the PI and it still isn't working. No matter if I press the power button off (its pushed in right now) or if I hit reset, nothing happens. The switch inside is ON.

I'm confused by your comment. You say "hit reset", I'm not sure what that means. This script is for the GPi, the Gameboy case. There is no "reset" button, only the switch at the top and the internal switch that enables safe shutdown.

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

Successfully merging this pull request may close these issues.

2 participants