From 32de9d515ba54f7635545f20c9f81d7cc0442d66 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 14 Oct 2024 14:13:41 -0600 Subject: [PATCH] Delete recommendations to mount fdescfs (#40) fdescfs used to be useful to help Python more quickly close file descriptors before exec(). But for years, Python has been using closefrom() instead. All versions of Python 3.9 and later do that. Fixes #39 --- README.md | 3 --- iocage_lib/ioc_check.py | 32 -------------------------------- 2 files changed, 35 deletions(-) diff --git a/README.md b/README.md index 5f3754b8..c968fb3f 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,3 @@ me:\ net.link.bridge.pfil_onlyip=0 # Only pass IP packets when pfil is enabled net.link.bridge.pfil_bridge=0 # Packet filter on the bridge interface net.link.bridge.pfil_member=0 # Packet filter on the member interface -- Lots of jails or a big server? Mount `fdescfs`: - - mount -t fdescfs null /dev/fd diff --git a/iocage_lib/ioc_check.py b/iocage_lib/ioc_check.py index 815bfcf4..11676196 100644 --- a/iocage_lib/ioc_check.py +++ b/iocage_lib/ioc_check.py @@ -54,7 +54,6 @@ def __init__( self.callback = callback self.silent = silent - self.__check_fd_mount__() self.__check_datasets__() self.pool_root_dataset = Dataset(self.pool, cache=reset_cache) @@ -134,34 +133,3 @@ def __check_datasets__(self): }, _callback=self.callback) - def __check_fd_mount__(self): - """ - Checks if /dev/fd is mounted, and if not, give the user a - warning. - """ - - if os.path.ismount("/dev/fd"): - # all good! - - return - - messages = collections.OrderedDict([ - ("1-NOTICE", "*" * 80), - ("2-WARNING", "fdescfs(5) is not mounted, performance" - " may suffer. Please run:"), - ("3-INFO", "mount -t fdescfs null /dev/fd"), - ("4-WARNING", "You can also permanently mount it in" - " /etc/fstab with the following entry:"), - ("5-INFO", "fdescfs /dev/fd fdescfs rw 0 0"), - ("6-NOTICE", f"{'*' * 80}\n") - ]) - - for level, msg in messages.items(): - level = level.partition("-")[2] - - iocage_lib.ioc_common.logit({ - "level": level, - "message": msg - }, - _callback=self.callback, - silent=self.silent)