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 LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 4.0.3
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup