Cotal TypeScript packages
    Preparing search index...

    Function lockExclusiveNb

    • Take an exclusive kernel lock on the open file fd without blocking. True when this process now holds it, false when another open file does. flock(2) on Linux and macOS; on Windows LockFileEx on one byte at 1 GiB, past any content, so readers of the file are never blocked. Either way the system releases it when the holder's last handle closes, including at its death.

      Parameters

      • fd: number

      Returns boolean