Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix a readlink() typo in Psystem_daemon()
@ 2026-11-18 23:25 Eslam Almorshdy via B4 Relay
  2026-11-18 23:25 ` [PATCH 1/2] libproc: fix " Eslam Almorshdy via B4 Relay
  2026-11-18 23:25 ` [PATCH 2/2] test: add test for system daemons with regular files as streams Eslam Almorshdy via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Eslam Almorshdy via B4 Relay @ 2026-11-18 23:25 UTC (permalink / raw)
  To: dtrace; +Cc: Kris Van Hees, Nick Alcock, Eslam Almorshdy

Psystem_daemon() tests readlink() == 0, but readlink() returns the
number of bytes stored or -1, so the "regular file outside /var" rule
never applied: every root process without a terminal was a system
daemon wherever systemd doesn't decide.

Patch 1 is the one-character fix.  Patch 2 adds a test that hides
/run/systemd with unshare, so the rule is exercised on systemd hosts
too.  On systems without systemd Patch 1 also turns pid/tst.emptystack,
tst.float, tst.manypids and tst.probemod green.

---
Eslam Almorshdy (2):
      libproc: fix readlink() typo in Psystem_daemon()
      test: add test for system daemons with regular files as streams

 libproc/Pcontrol.c                            |  2 +-
 test/unittest/proc/tst.system-daemon-files.r  |  2 +
 test/unittest/proc/tst.system-daemon-files.sh | 94 +++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 1 deletion(-)
---
base-commit: 61fea621160ea4b6302874c62a723da105b44883
change-id: 20261118-b4-bug008-daemon-readlink-67e33013fbc5

Best regards,
--  
Eslam Almorshdy <ealmorshdy@d-matrix.ai>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-19  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 23:25 [PATCH 0/2] Fix a readlink() typo in Psystem_daemon() Eslam Almorshdy via B4 Relay
2026-11-18 23:25 ` [PATCH 1/2] libproc: fix " Eslam Almorshdy via B4 Relay
2026-11-19  4:42   ` Kris Van Hees
2026-11-18 23:25 ` [PATCH 2/2] test: add test for system daemons with regular files as streams Eslam Almorshdy via B4 Relay
2026-11-19  4:42   ` Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox