screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #38335] /tmp/screens creation race


From: Richard Kojedzinszky
Subject: [screen-devel] [bug #38335] /tmp/screens creation race
Date: Fri, 15 Feb 2013 05:33:32 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]