#288 closed defect (fixed)
The --with-gpg option can cause startup to hang
Reported by: | rainer | Owned by: | rainer |
---|---|---|---|
Priority: | major | Milestone: | 3.0.2 |
Component: | main | Version: | |
Keywords: | Cc: |
Description
As reported by Andy Jack, the --with-gpg option may cause startup to hang with high cpu load. Apparently the parent process, while trying to read from the pipe, would starve the child such that it never writes. The following patch was provided by Andy Jack:
--- a/src/sh_gpg.c 2011-12-05 04:47:52.000000000 -0500 +++ b/src/sh_gpg.c 2012-02-09 15:48:57.057198707 -0500 @@ -859,6 +859,7 @@ if (ferror(source.pipe) && errno == EAGAIN) { + retry_msleep(0,10); /* sleep 10 ms to avoid starving the gpg child writing to the pipe */ clearerr(source.pipe); goto xagain; } @@ -937,6 +938,7 @@ if (ferror(source.pipe) && errno == EAGAIN) { + retry_msleep(0,10); /* sleep 10 ms to avoid starving the gpg child writing to the pipe */ clearerr(source.pipe); goto yagain; }
Note:
See TracTickets
for help on using tickets.
Believed to be fixed by changeset [391],