Last active
December 27, 2015 00:39
-
-
Save drub0y/7239374 to your computer and use it in GitHub Desktop.
This is a decompiled view of how the PowerShell provider (specifically it's TypeManager class) for IIS attempts to provide consistency btwn the execution of a command and the commits actually being written to disk in applicationHost.config. All kinds of fun ensues when committing the changes to disk doesn't actually happen within that one second…
This file contains hidden or 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
public void CommitChanges(bool doCommit) | |
{ | |
if (!this.InCommitDelay() && this.WritableServerManager != null) | |
{ | |
try | |
{ | |
if (doCommit) | |
{ | |
this.commitSynchronization = new AutoResetEvent(false); | |
this.WritableServerManager.CommitChanges(); | |
this.commitSynchronization.WaitOne(1000, false); | |
} | |
} | |
finally | |
{ | |
this.commitSynchronization = null; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment