From: Daniel Dickman Subject: remove dead/misleading code from dpb(1) To: ports@openbsd.org Date: Fri, 15 May 2026 22:10:52 -0400 I have an ok guenther@ on the below, but was hoping an actual dpb user would also give me an ok. The code below is confused and does nothing, therefore we can remove it. It looks like the original intent was to set FD_CLOEXEC, but it uses F_GETFL where is should be useing F_GETFD. The same problem for F_SETFL vs F_SETFD. We could fix it, but guenther@ points out that perl already sets FD_CLOEXEC on new fds by default so it's not needed... I then also removed "use Fcntl" because I don't think anything else in the file needs it. ok? Index: User.pm =================================================================== RCS file: /cvs/ports/infrastructure/lib/DPB/User.pm,v diff -u -p -u -r1.27 User.pm --- User.pm 6 May 2023 05:20:31 -0000 1.27 +++ User.pm 16 May 2026 02:01:09 -0000 @@ -25,7 +25,6 @@ use v5.36; # the main class is a user that can be used for various operations package DPB::User; -use Fcntl; sub from_uid($class, $u, $g = undef) { @@ -138,8 +137,6 @@ sub open($self, $mode, @parms) return undef; } if (open(my $fh, $mode, @parms)) { - my $flags = fcntl($fh, F_GETFL, 0); - fcntl($fh, F_SETFL, $flags | FD_CLOEXEC); return $fh; } else { return undef;