t = open(">/sys/blah/transaction") ... # write lots of new values write(t, "commit") close(t)
write(t, "rollback") or just closing the filehandle without writing "commit" would cause the new values to be discarded. Until the commit, everything else sees the old values. No danger from crashing programs, just kill them and start a new transaction. There are issues about concurrent updates to multiple parts of /sys but that'll be true in any system that provides atomic updates for multiple values.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds