-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to figure out why nickel deadlocks on restart...
- Loading branch information
Showing
2 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 comments
on commit c2bd85b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's for the broken rotation crap on some devices (namely, the H2O). There's a bunch of threads about this on MR, frostschutz did extensive testing to try to handle it properly.
Since it's a sysfs virtual file, I'm not sure we really care about the potential raciness, though.
AFAICT, it does the job just fine as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I found the rationale. Anyway, I noticed those lines through #1597 and wondered about the bad practice. :P
I'm not really sure what the point of this entire line is, but reading and writing a file in the same pipe is a race condition that should be avoided because it can lead to data loss (file being truncated), although I suppose since there's only one character that should be an issue. Anyway, that means it should be
cat /sys/class/graphics/fb0/rotate > tmpfile && mv tmpfile /sys/class/graphics/fb0/rotate
. Except obviously the entire thing seems redundant with the preceding line.