URL: <http://savannah.gnu.org/bugs/?38335>
Summary: /tmp/screens creation race Project: GNU Screen Submitted by: krichy Submitted on: Fri 15 Feb 2013 05:33:30 AM GMT Category: Program Logic Severity: 3 - Normal Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Release: 4.0.3 Fixed Release: None Planned Release: None Work Required: None _______________________________________________________ Details: Our unix user accounts for different services have a @reboot entry in their crontabs, but as cron starts this entries paralell upon boot, I eventually got some screen instances not starting, and the corresponding error message is sent by cron, stating that /tmp/screens already exists. It seems that first a check is made for existence of that dir (stat()), and if missing, then it is created. In my opinion, an mkdir() could always be called instead stat() and mkdir(), as it implicitly checks the existence, actually does no harm at all, and the result is the same. Or, to finally check the rights on the dir, then they may be reversed, so first mkdir(), then stat() it. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?38335> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/