]> git.neil.brown.name Git - susman.git/commit
cycle_watchers: don't write the 'all done' signal until after the rename.
authorNeilBrown <neilb@suse.de>
Sun, 22 Apr 2012 04:23:15 +0000 (14:23 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 22 Apr 2012 04:23:15 +0000 (14:23 +1000)
commit33c0bebbbf2defd40ac00941ec9c9bb4fe7ea25e
tree044d87b6f328a3b699f5edd9e02f448ee3b4ec6a
parent5cb2b636fb40adf17bec3dd3bde94abd7f7dc27d
cycle_watchers: don't write the 'all done' signal until after the rename.

When a suspend cycle is finished we move the new 'watching-next' into
place and we write to the old one to make sure any process watching
will notice something has happened.

It is best to write to the file *After* the rename else a process that
notices the file change might make wrong assumptions about the
then-current 'watching' file.

i.e. close a small and probably unimportant race.

Signed-off-by: NeilBrown <neilb@suse.de>
lsusd.c