Skip to content

eject: use libmount context API for umount#4453

Open
cgoesche wants to merge 1 commit into
util-linux:masterfrom
cgoesche:use_libmnt_eject
Open

eject: use libmount context API for umount#4453
cgoesche wants to merge 1 commit into
util-linux:masterfrom
cgoesche:use_libmnt_eject

Conversation

@cgoesche

Copy link
Copy Markdown
Collaborator

libmount provides a context API that can be used to replace the fork+exec code pattern needed to leverage umount(8). This does not only simplify the code base but also removes the concern for signal handling due to a wait(2) call, avoids forking and allocating additional system resources, reduces security management and makes the code more consistent as other functions were already using some libmount functionalities.

Comment thread sys-utils/eject.c
Comment thread sys-utils/eject.c
libmount provides a context API that can be used to replace
the fork+exec code pattern needed to leverage umount(8).
This does not only simplify the code base but also removes
the concern for signal handling due to a wait(2) call, avoids
forking and allocating additional system resources, reduces
security management and makes the code more consistent as other
functions were already using some libmount functionalities.

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
@cgoesche cgoesche force-pushed the use_libmnt_eject branch from 57f999d to f0f76aa Compare July 3, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants