Main Koha release repository
https://koha-community.org
a3c64f62c0
When background_jobs_worker.pl spawns a new child process, it needs to explicitly reinitialize the random seed - otherwise each child process will inherit the same random seed from the parent process, and any randomization will produce identical results each time. This patch adds a call to srand immediately after the fork to reinitialize the seed. Note that child processes should not call srand with no parameter anywhere else, as the Perl documentation indicates that srand should not be called with no parameter more than once per process. To test: 1. Apply the logging patch only 2. Set system preferences: a. RealTimeHoldsQueue -> Enable b. RandomizeHoldsQueueWeight -> in random order 3. Watch the logs for the staff interface in ktd: ktd --shell koha-intra-err 4. Place a hold. Note that the logs display the branch list before and after it is randomized. 5. Place some more holds. Note that the branch order after randomization is identical each time. 6. Apply both patches and restart_all 7. Repeat steps 3-5. -> Note that the branch order before randomization hasn't changed -> Note that the branch order after randomization is now different each time. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
acqui | ||
admin | ||
api | ||
authorities | ||
basket | ||
bin | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
clubs | ||
course_reserves | ||
debian | ||
docs | ||
erm | ||
errors | ||
etc | ||
ill | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
lib/CGI/Session/Serialize | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
patron_lists | ||
patroncards | ||
plugins | ||
pos | ||
recalls | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
serials | ||
services | ||
skel | ||
suggestion | ||
svc | ||
t | ||
tags | ||
tools | ||
virtualshelves | ||
xt | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.htaccess | ||
.mailmap | ||
.perlcriticrc | ||
.perltidyrc | ||
.proverc.dist | ||
.stylelintrc.json | ||
about.pl | ||
app.psgi | ||
build-resources.PL | ||
changelanguage.pl | ||
cpanfile | ||
cypress.json | ||
fix-perl-path.PL | ||
gulpfile.js | ||
help.pl | ||
INSTALL | ||
Koha.pm | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
package.json | ||
README | ||
README.md | ||
README.robots | ||
rewrite-config.PL | ||
tsconfig.json | ||
webpack.config.js | ||
yarn.lock |
Koha is a free software integrated library system (ILS).
Koha is distributed under the GNU GPL version 3 or later.
Note: Koha does not accept pull requests from git hosting sites.
Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.
For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch
The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook