Skip to content

Commit 4d572a3

Browse files
committed
Issue #2407: no need to load IPC::SysV.
1 parent 6064100 commit 4d572a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Kernel/System/Log.pm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,14 @@ sub new {
118118
%Param,
119119
);
120120

121-
return $Self unless eval 'require IPC::SysV'; ## no critic qw(BuiltinFunctions::ProhibitStringyEval)
121+
# The code has hardcoded values for the flags passed to shmget(). Therefore
122+
# there is no need to load IPC::SysV. Using the availablity of IPC::SysV as an indicator
123+
# whether shmget() works is not a good idea. IPC::SysV is a core module.
124+
# TODO: actually use the constants from IPC::SysV.
125+
#return $Self unless eval 'require IPC::SysV';
122126

123127
# Setup IPC for shared access to the last log entries.
124-
my $IPCKey = '444423' . $SystemID; # This name is used to identify the shared memory segment.
128+
my $IPCKey = '444423' . $SystemID; # This name is used to identify the shared memory segment.
125129
$Self->{IPCSize} = $ConfigObject->Get('LogSystemCacheSize') || 32 * 1024;
126130

127131
# Create/access shared memory segment.

0 commit comments

Comments
 (0)