⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
libipc-shareable-perl
/
examples
/
Edit File: hvtest1
#!/usr/bin/perl -w # # Test of shared hashes courtesy Joe Thomas <jthomas@women.com> use strict; use IPC::Shareable; use vars qw($counter %hash); tie %hash, 'IPC::Shareable', undef, {create => 'yes', destroy => 'yes'}; tie $counter, 'IPC::Shareable', undef, {create => 'yes', destroy => 'yes'}; $| = 1; for (my $i = 0; $i < 3; $i++) { sleep 1; next if fork(); hashcount(3, 3); exit; } while (1) { last if wait() == -1; } sub hashcount { my ($loops, $sleeptime) = @_; for (my $i = 0; $i < $loops; $i++) { (tied $counter)->shlock; (tied %hash)->shlock; $hash{++$counter} = $$; print "Process $$ sees:\n"; for my $key (sort keys %hash) { print "\$hash{$key} = $hash{$key}\n"; } (tied %hash)->shunlock; (tied $counter)->shunlock; sleep $sleeptime; } } exit; __END__
Simpan