bugGNU Screen - Bugs: bug #38335, /tmp/screens creation race

 
 

bug #38335: /tmp/screens creation race

Submitter:  Richard Kojedzinszky <krichy>
Submitted:  Fri 15 Feb 2013 05:33:30 AM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.0.3
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 15 Feb 2013 05:33:30 AM UTC, original submission:  

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.

Richard Kojedzinszky <krichy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by krichy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code