Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Issue 584010: Chroot: allow multiple simultaneous entry. (Closed)

Created:
10 years, 10 months ago by adlr
Modified:
9 years ago
Reviewers:
tedbo
CC:
chromium-os-reviews_googlegroups.com
Visibility:
Public.

Description

Chroot: allow multiple simultaneous entry. Change enter_chroot.sh to keep a list of open PIDs (enter_chroot.sh instances) in chroot/var/lock, and use flock on that file to support atomic operations to it. When entering chroot, append the PID to the lock file. When exiting chroot, clear out current PID and any dead PIDs/duplicates. If the lock file is empty, only then clean up the mounts. Note that I have a little bit of code duplication: the number 200, which is a manually numbered fd in bash, seemed impossible to place inside a variable. If you know how to do it, please let me know.

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix for review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -23 lines) Patch
M src/scripts/enter_chroot.sh View 1 1 chunk +63 lines, -23 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
adlr
10 years, 10 months ago (2010-02-09 00:15:46 UTC) #1
tedbo
This is a cool change. Thanks! One comment below: http://codereview.chromium.org/584010/diff/1/2 File src/scripts/enter_chroot.sh (right): http://codereview.chromium.org/584010/diff/1/2#newcode122 src/scripts/enter_chroot.sh:122: ...
10 years, 10 months ago (2010-02-09 04:01:54 UTC) #2
adlr
oh, good catch. no idea how i missed it... ready for another look.
10 years, 10 months ago (2010-02-09 16:43:33 UTC) #3
tedbo
10 years, 10 months ago (2010-02-10 08:44:29 UTC) #4
LGTM

Thanks! A number of people have been wanting this.

Powered by Google App Engine
This is Rietveld 408576698