Subject: | Race condition in new() |
Date: | Wed, 9 Dec 2015 15:26:12 +0000 |
To: | bug-Daemon-Generic [...] rt.cpan.org |
From: | Anton Oussik <anton.oussik [...] smoothwall.net> |
In the code around the sleep(2) line there is then a read_file($pidfile),
but there is no guarantee of it still being there, or even being the same
file, or containing anything vaguely related to what was there when the
decision to branch was made.
When multiple and frequent start and stop commands are passed at a
relatively high rate this can easily result in various failure modes, such
as several daemons being started simultaneously.
--
Anton Oussik
Developer
*smoothwall*
www.smoothwall.com
Office : +44 148-988-6126
Head Office : Avalon, 1 Savannah Way, Leeds, LS10 1AB, United Kingdom
Tech Office : Eagle Point, Little Park Farm Road, Fareham, PO15 5TD, United
Kingdom
US Office : 8008 Corporate Center Dr #410, Charlotte, NC 28226, United
States
Telephone: UK: +44 870-199-9500 US: +1 800-959-3760
<https://www.facebook.com/smoothwall?ref=hl> [image:
http://s3-eu-west-1.amazonaws.com/smoothwallweb/twitter.png]
<https://twitter.com/Smoothwall> [image:
http://s3-eu-west-1.amazonaws.com/smoothwallweb/googleplus.png]
<https://plus.google.com/u/0/105975318877636922166/posts> [image:
circle_test] <http://smoothwall.uservoice.com/forums/145832-general> [image:
linkedin_test] <https://www.linkedin.com/company/smoothwall-ltd>
Smoothwall Limited is registered in England, Company Number: 4298247 and
whose registered address is 1 John Charles Way, Leeds, LS12 6QA United
Kingdom.
This email and any attachments transmitted with it are confidential to the
intended recipient(s) and may not be communicated to any other person or
published by any means without the permission of Smoothwall Ltd. Any
opinions stated in this message are solely those of the author.