[Rpm-maint] [rpm-software-management/rpm] Stop blocking when GPG process dies prematurely (RhBug:1746353) (#938)
Panu Matilainen
notifications at github.com
Wed Nov 27 11:35:33 UTC 2019
pmatilai commented on this pull request.
> @@ -276,7 +296,17 @@ static int runGPG(sigTarget sigt, const char *sigfile)
rpmPopMacro(NULL, "__plaintext_filename");
rpmPopMacro(NULL, "__signature_filename");
- fnamedPipe = Fopen(namedPipeName, "w");
+ while (1) {
+ errno = 0;
+ fnamedPipe = Fopen(namedPipeName, "w");
+ if (errno != EINTR)
Never trust errno alone, it can get set as a side-effect even on success (generally speaking). You'll want to move the "Fopen failed" check from below here, and only look at errno if the open failed.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/938#pullrequestreview-323608669
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191127/b6f9b1e3/attachment.html>
More information about the Rpm-maint
mailing list