From: Sergey Matveev Date: Sun, 26 Nov 2023 07:53:30 +0000 (+0300) Subject: Prevent race X-Git-Tag: v2.5.0~1 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=ccae778c341cbc42bdafd928939ba7708cb7e9b8 Prevent race --- diff --git a/doc/news.texi b/doc/news.texi index 2684d05..989fd30 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -2,6 +2,14 @@ @cindex news @unnumbered News +@anchor{Release 2_5_0} +@section Release 2.5.0 +@itemize +@item + Prevent rare race in the code, where externally modified target may + panic the program. +@end itemize + @anchor{Release 2_4_0} @section Release 2.4.0 @itemize diff --git a/run.go b/run.go index 3fd4168..7ca2a70 100644 --- a/run.go +++ b/run.go @@ -289,9 +289,11 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error { if StopIfMod { return fmt.Errorf("%s externally modified", tgt) } + Jobs.Add(1) tracef(CWarn, "%s externally modified: not redoing", tgt) go func() { errs <- nil + Jobs.Done() }() return nil } diff --git a/usage.go b/usage.go index cb2761f..0a7cd6a 100644 --- a/usage.go +++ b/usage.go @@ -24,7 +24,7 @@ import ( ) const ( - Version = "2.4.0" + Version = "2.5.0" Warranty = `Copyright (C) 2020-2023 Sergey Matveev This program is free software: you can redistribute it and/or modify