Skip to content

Commit

Permalink
Don't call HasExited on CurrentProcess - fixes #599
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Feb 12, 2015
1 parent 357b1cc commit 25c363a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
@@ -1,3 +1,6 @@
#### 0.27.10 - 12.02.2015
* BUGFIX: Don't call HasExited on CurrentProcess - https://github.com/fsprojects/Paket/issues/599

#### 0.27.9 - 10.02.2015
* Add a simple API which allows to retrieves NuGet v3 autocomplete

Expand Down
3 changes: 2 additions & 1 deletion src/Paket.Core/Utils.fs
Expand Up @@ -212,7 +212,8 @@ let RunInLockedAccessMode(rootFolder,action) =
if File.Exists fileName then
let content = File.ReadAllText fileName
if content <> p.Id.ToString() then
let processes = Process.GetProcessesByName(p.ProcessName)
let currentProcess = Process.GetCurrentProcess()
let processes = Process.GetProcessesByName(p.ProcessName) |> Array.filter (fun p -> p <> currentProcess)
if processes |> Array.exists (fun p -> p.HasExited = false && content = p.Id.ToString()) then
if startTime + timeOut <= DateTime.Now then
failwith "timeout"
Expand Down

0 comments on commit 25c363a

Please sign in to comment.