Ticket #3025 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

race condition when creating tmp dir

Reported by: Polynomial-C Owned by: andrew_b
Priority: minor Milestone: 4.8.9
Component: mc-core Version: 4.8.8
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

This bug was originally reported at https://bugs.gentoo.org/461284

When there's no mc-tmpdir and a user tries to start two mc sessions simultaneously, sometimes (in one out of ten attempts on my machine) one mc session emits the following error message:

Cannot create temporary directory /tmp/mc-lars: File exists (17)
Temporary files will be created in /tmp
Press any key to continue...

Steps to reproduce:

# rm /tmp/mc-$(whoami) -rf
# uxterm -e mc & uxterm -e mc

You may try any other terminal emulator but it should be one that doesn't take too long to start.

The reporter of the Gentoo bug also provided a patch (which I have attached to this bug) that seems to fix the problem.

Attachments

mc-tmpdir-creation_race_condition_fix.patch (1.5 KB) - added by Polynomial-C 11 years ago.

Change History

Changed 11 years ago by Polynomial-C

comment:1 Changed 11 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.9

Applied. Thnaks!

Branch: 3025_race_cond_reate_tmp_dir
changeset:306382a995ca641d4457d6592daac66b7be634da

comment:2 Changed 11 years ago by angel_il

  • Votes for changeset set to angel_il

comment:3 Changed 11 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko
  • Branch state changed from on review to approved

comment:4 Changed 11 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:5 Changed 11 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.