Skip to content

darwin: fix named FIFO selection - #399

Merged
jiegec merged 1 commit into
lsof-org:masterfrom
hja-oss:fix/darwin-named-fifo-selection
Nov 17, 2026
Merged

jiegec merged 1 commit into
lsof-org:masterfrom
hja-oss:fix/darwin-named-fifo-selection

Conversation

@hja-oss

@hja-oss hja-oss commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Fix pathname selection of open named pipes on macOS.

Save the filesystem device number for FIFO vnodes so device-and-inode matching works, including through hard links and symlinks.

@hja-oss

hja-oss commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Maybe needs to me more explained:
This patch prevents the device number from being saved:

switch (Ntype) {
case N_FIFO:
    break;       /* FIFO: exit this switch without saving anything */
...
default:
    Lf->dev = dev = vip->vip_vi.vi_stat.vst_dev;
    Lf->dev_def = devs = 1;
}

After removing case N_FIFO: break; a FIFO reaches the existing default code, which saves its device number.

@jiegec
jiegec merged commit ed7d478 into lsof-org:master Nov 17, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants