Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    d47b241c
    wrap: Tell child process to take out its own lock if necessary · d47b241c
    Simon McVittie authored
    
    Non-OFD locks don't propagate across fork(), and bwrap needs to clone()
    itself (which behaves like fork() in this respect) to separate itself
    into a parent outside the container and a child inside the container.
    
    This change adds a weak dependency on Linux 3.15. If we run on an older
    version, everything should still *work*, but there will be a short
    period of time during which we have already decided to use the runtime,
    but it is not locked (and in particular not protected from deletion).
    
    Fixes: 959fd338 "wrap: Take out a lock on the container's runtime for the duration"
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    d47b241c
    History
    wrap: Tell child process to take out its own lock if necessary
    Simon McVittie authored
    
    Non-OFD locks don't propagate across fork(), and bwrap needs to clone()
    itself (which behaves like fork() in this respect) to separate itself
    into a parent outside the container and a child inside the container.
    
    This change adds a weak dependency on Linux 3.15. If we run on an older
    version, everything should still *work*, but there will be a short
    period of time during which we have already decided to use the runtime,
    but it is not locked (and in particular not protected from deletion).
    
    Fixes: 959fd338 "wrap: Take out a lock on the container's runtime for the duration"
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>