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

 
 

bug #38335: /tmp/screens creation race

Submitted by:  Richard Kojedzinszky <krichy>
Submitted on:  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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3