![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /usr/share/doc/libhtml-template-perl/examples/ |
#!/usr/bin/env perl use strict; use warnings; # this script deletes all shared memory segments accessible by the # running user. Probably only works on Linux systems. open(IPCS, 'ipcs |') or die "Probs opening icps : $!"; my $mode = 0; while (<IPCS>) { if (/(Shared)|(Semaphore)|(Message)/) { $mode++; next; } next unless /^0x[0-9a-f]+\s(\d+)\s.*$/; system("ipcrm shm $1") if ($mode == 1); system("ipcrm sem $1") if ($mode == 2); system("ipcrm msg $1") if ($mode == 3); }