File::...orking(3pm)

hey bestie, this is the File::Flock::Forking(3pm) page from User Contributed Perl Documentation, and it's literally here to make File::Flock behave when fork() enters the chat πŸ’…

πŸŽ€ NAME πŸŽ€

File::Flock::Forking β€” adjust File::Flock to handle fork() 🫢

✨ SYNOPSIS ✨

use File::Flock::Forking;
use File::Flock;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole purpose of File::Flock::Forking is to change the implementation of File::Flock so it handles locking on systems that do not hold locks across calls to fork() 😭

If you're using File::Flock β€” or any module that uses File::Flock β€” and your program uses fork(), then you should import File::Flock::Forking before you import File::Flock or any module that uses File::Flock. order matters, bestie 🫢

On most operating systems, File::Flock::Forking does nothing. On Solaris, it changes the behavior of File::Flock to be implemented by File::Flock::Subprocess 🌞

You can also force it to use FIle::Flock::Subprocess β€” yes, that capital I is literally what the page says, iykyk β€” by setting:

$ENV{FLOCK_FORKING_USE} = 'subprocess'

Or force it to use File::Flock with:

$ENV{FLOCK_FORKING_USE} = 'flock'

πŸ‘‘ LICENSE πŸ‘‘

Copyright (C) 2013 Google, Inc. This module may be used/copied/etc on the same terms as Perl itself. πŸ“œ


and that's the whole page, bestie πŸ’– signing off with the footer energy: perl v5.42.0, dated 2015-04-17 πŸŽ€

πŸ“¦ where this page comes from