/usr/share/doc/dpkg
NameSizeModeActions
AUTHORS12340644editdlrm
changelog6923000644editdlrm
dpkg.cron.daily12980644editdlrm
frontend.txt10940644editdlrm
protected-field.txt31640644editdlrm
README35450644editdlrm
README.api15500644editdlrm
README.bug-usertags51900644editdlrm
README.feature-removal-schedule57570644editdlrm
rootless-builds.txt72960644editdlrm
THANKS65960644editdlrm
TODO53240644editdlrm
triggers.txt366160644editdlrm
Edit: /usr/share/doc/dpkg/frontend.txt (1094B)
Frontend Interfaces =================== This file will try to document some of the interfaces that dpkg makes available to frontends or that expects them to use, which are currently not covered by any other type of documentation. Database Locking ---------------- Any frontend needing to make sure no write operation is currently happening, and no other frontend is running should first acquire the frontend lock at «/lock-frontend», and then acquire the dpkg database lock at «/lock». When the frontend invokes dpkg, it should set the environment variable DPKG_FRONTEND_LOCKED (to prevent dpkg from acquiring the frontend lock), and then release the dpkg database lock, which will be acquired by dpkg itself. This way no other frontend following this protocol can race to perform operations while another one has one in progress. These locks must be file record locks (i.e. fcntl(2) advisory locking), and the whole file should be locked, as that's the most portable way to perform this operation; this can be achieved by using start=0, len=0 and whence=SEEK_SET.