about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-20 06:30:13 +0000
committerEric Wong <e@80x24.org>2020-12-20 20:39:12 +0000
commitba958c1a44ca7e48a5790a2ecb2198636d6492db (patch)
treef1103278e5b22a14a82f9858791f1bdec38428b6 /lib
parentab243aa2328e2fc4cf895c99c68345e57cc4653c (diff)
downloadpublic-inbox-ba958c1a44ca7e48a5790a2ecb2198636d6492db.tar.gz
systemd users won't need it polluting the namespace; though
other things are still likely to load it.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Daemon.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index a2171535..d1a42fc3 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -11,7 +11,6 @@ use IO::Socket;
 use POSIX qw(WNOHANG :signal_h);
 use Socket qw(IPPROTO_TCP SOL_SOCKET);
 sub SO_ACCEPTFILTER () { 0x1000 }
-use Cwd qw/abs_path/;
 STDOUT->autoflush(1);
 STDERR->autoflush(1);
 use PublicInbox::DS qw(now);
@@ -202,10 +201,11 @@ sub check_absolute ($$) {
 
 sub daemonize () {
         if ($daemonize) {
+                require Cwd;
                 foreach my $i (0..$#ARGV) {
                         my $arg = $ARGV[$i];
                         next unless -e $arg;
-                        $ARGV[$i] = abs_path($arg);
+                        $ARGV[$i] = Cwd::abs_path($arg);
                 }
                 check_absolute('stdout', $stdout);
                 check_absolute('stderr', $stderr);