IPC-Shareable

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      size_t, where the size wraps to an allocatable value and the tie succeeds
    - Replace global seg_count()/sem_count() cleanup checks with a
      process-scoped assert_clean_process(); the suite now passes under
      `prove -j4`. t/00-base and t/99-end keep a global count check, serial-only
    - Re-key ~30 more tests with per-run keys so concurrent runs can't collide.
      t/06-key stays serial-only (it pins the key-generation algorithm)
    - clean_up_testing() now removes only segments the caller created or whose
      creator has exited, leaving another live process's segments alone -- safe
      under `prove -j` and concurrent smokers
    - Tied SCALARs holding a plain (non-reference) value now store it verbatim
      rather than JSON/Storable-wrapping it; references still share their
      structure as before. (Numbers read back in string form, but still compare
      equal numerically)
    - Fix a shared-memory segment leak when a tie created its segment but failed
      to set up its semaphore (eg. ENOSPC) or acquire its initial lock: the
      segment (and any semaphore set we created) is now removed before croaking,
      which still reports the underlying cause
    - Make the suite resilient on hosts with a small semaphore budget (eg.
      OpenBSD, semmni=10): t/94 and t/95 release their IPC between steps there.
      Adds sem_set_limit/low_sem_resources/relieve_ipc_pressure helpers, plus
      t/96 and t/97
    - Tolerate a semaphore set removed by another process (EINVAL on the next
      operation), the cause of intermittent CPAN-tester failures on heavily
      parallel smokers. _write_permitted() now skips its advisory lock check
      when getval() returns undef (it had been emitting "uninitialized value
      in numeric gt" warnings), and unlock() warns once and continues rather
      than croaking "Could not release semaphore lock". Adds
      t/81-sem-removed-under-lock.t
    - Finish migrating the forked tests off the lost-wakeup SIGALRM/sleep
      handshake (which could hang a smoker or desync the processes): t/03, 18,
      28, 30, 36, 66 and 85 now use a shared pipe-barrier helper
      (barrier_new/barrier_wait/barrier_release in t/IPCShareableTest.pm)

1.17    2026-05-31
    - POD enhancements regarding testing_set() and clean_up_testing()
    - Test VM enhancements (now allows Async::Event::Interval to piggy back
      them)
    - sysv_info() now reports semaphore limits (semmni, semmns, semmsl, semopm)
      alongside the shm* keys on FreeBSD, Linux, macOS, and OpenBSD; lets
      tests size themselves to the platform's kern.ipc.semmni budget
    - FreeBSD CI: pre-test IPC cleanup widened to non-system users and root;
      optional IPC_DEBUG_DELTAS=1 enables per-file leak detection
    - Fix CPAN test failures on Mock::Sub 1.08 (t/20, t/60, t/68; t/85 had the
      same latent issue): those tests mocked subs with 'return_value => undef',
      but Mock::Sub 1.08 returns the sub's call args (not undef) in that case,
      so the croak/warn-on-undef paths under test never fired. Replaced those
      mocks with block-scoped local typeglob overrides that return undef
      directly, and raised the Mock::Sub build prereq to 1.09

1.16    2026-05-27
    - POD: Promoted the signal handling note into its own section under
      DESTRUCTION
    - Fully implement Dragonfly BSD unit test VM infrastructure
    - Fix shmid_ds unpack for Dragonfly BSD
    - Prevent macOS extended attributes from leaking into dist tarballs

1.15    2026-05-26
    - Refactor how we initialize $VERSION. It's no longer in a BEGIN block. That
      broke Dist::Mgr
    - Fixes #60: Fix FETCH deadlock when inner child re-decode acquires SH lock
      against LOCK_EX cascade held by _lock_children
    - Fix OpenBSD 64-bit shmid_ds binary layout (verified via offsetof on 7.4):
      segsz is int (4B not 8B), nattch is short (2B), and struct has nanosecond
      fields between time_t values.  Updated t/80-SharedMem.t synthetic test and
      shm_segments() segsz extraction to match.
    - Added OpenBSD test VM infrastructure
    - t/20-lock_operation.t: probe for adequate semaphore resources before
      running, skip gracefully on low-limit platforms (OpenBSD semmni=10).
      Added periodic _end() cleanup calls so peak semaphore usage stays within
      the default limit on OpenBSD.
    - Added 'testing' flag; allows bulk cleanup of leaked segs/sems from a
      previous test run. This was implemented in this distribution's unit test
      suite
    - Fix t/80-SharedMem.t: skip 64-bit tests on 32-bit Perl where the 'q' pack
      template is unavailable (Raspian OS specifically)

1.14     2026-05-22
    - Modify remove() to properly catch a non "0 but true" case when trying
      to destroy segments and semaphores so warnings are displayed properly
    - remove() now leaves the global and process registers intact if the destroy
      operation fails
    - Rename _mg_tie() to _magic_tie()
    - Rename _is_kid() to _is_child()
    - In IPC::SharedMem, removed leading underscore from object attributes
    - Parameter list in IPC::SharedMem::new() is now in the form of a hash
    - Code refactoring in IPC::SharedMem
    - Add POD for IPC::SharedMem
    - SharedMem::remove() now returns 1 on '0 but true' and 0 otherwise
      that was preventing matches from happening, and broke JSON
    - ipcs() now ignores lines that don't include an actual key
    - Add data() method to SharedMem. This strips off the NULL pad bytes from
      shmread()
    - Added key_hex() to SharedMem. Will allow for easier troubleshooting when
      using ipcs (closes #32)
    - Added SharedMem::stat(); returns a new object that contains the related
      info about the actual shared memory segment
    - Fixes #49; Logic error from old implementation of JSON
    - Fixes #47; Clean up broken code in old _decode_json()
    - Fixes #41; JSON serializer not handling nested data structures properly
    - Closes #52; Add tests and POD for SharedMem::stat struct methods
    - Added SharedMem::stats(), return an href of all segment stats
    - Closes #48; All tests now run unconditionally; there is no more
      CI_TESTING flag required
    - Greatly simplify the FIRSTKEY and NEXTKEY shared hash ops; removed the
      _iterating flag complexity and replaced it with an _hkey_list instead
    - Fixes #38; Fixed issue where the global_register was not being populated
      if a data access hadn't happened yet, causing leaked segments upon
      cleanup. This fix eliminated the weird 'Dumper' hack
    - Add new scripts/flush_ipc.sh script that cleans out all segments and
      semaphores from the system for the current user
    - Closes #28; Add link to Script::Singleton in singleton() POD
    - Closes #24; lock() now allows a cref parameter. If a LOCK_EX lock can be
      acquired, we will set the lock, execute the subroutine, then release the
      lock
    - 'tidy' attribute now defaults to true
    - All unit tests do a check for leaked segments and semaphores at their
      conclusion. Also, when running 'make test' it compares the numbers before
      and after and doubly makes sure there are no leaks
    - Closes #51; Better document that the 'size' attribute is for each segment,
      and not the overall size of all the data. Also emphasize that each nested
      data structure requires an additional segment, they aren't all stashed



( run in 0.510 second using v1.01-cache-2.11-cpan-9581c071862 )