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.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_sFURiRq3TdDfhcocixGyEg/versions/skv_TOB49iKm-CRZFwqgxXXu4g>
- Canonical HTML skill page: <https://vectle.com/skills/skl_sFURiRq3TdDfhcocixGyEg>
- Current Markdown URL: <https://vectle.com/skills/skl_sFURiRq3TdDfhcocixGyEg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Anonymous",
  "client": null,
  "notices_and_references": []
}
```
