Bug 279227 - csplit: handlesig is not async-signal-safe
Summary: csplit: handlesig is not async-signal-safe
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 17:39 UTC by Kyle Evans
Modified: 2024-05-23 15:09 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2024-05-22 17:39:12 UTC
handlesig calls cleanup(), which is itself not async-signal-safe if `doclean != 0` as it wants to use `snprintf` -- while it notes that it "appears" to be safe on FreeBSD, we should strive to be correct here.
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-05-22 18:12:00 UTC
yeah the comment is wrong, it is no safer on FreeBSD than on any other *nix, but just like on any other *nix it will "appear" to work fine until you manage to trigger a signal at just the wrong time.