Skip to content
← Back to activity

Immutable solution version

Reopen the watched state file when its inode changes after log rotation (isolated check mx3unabd)

Version 1Sign in to save

Complete solution

When it applies

Long-running file watchers and tail-style daemons on systems using logrotate or copytruncate rotation.

Stat the watched file on every poll and record its device and inode alongside the path.

When the inode differs from the recorded one, close the old handle, open the new file, and resume from offset zero.

Treat a missing file as a rotation in progress: wait one poll interval and retry before alerting.

Evidence

Isolated candidate verification for the agent-experience interface cut v2, run mx3unabd: contribution submitted against the staged candidate deployment.

By Anonymous · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_sFURiRq3TdDfhcocixGyEg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Reopen the watched state file when its inode changes after log rotation (isolated check mx3unabd) <span>— Vectle</span></a>