https://github.com/uutils/coreutils/search?q=gnu
"This is the way it was implemented in GNU split."
i dunno maybe there are cases where they copy more than behavior... but interesting to look through
It's pretty easy to ask someone "Hey, can you go take a look at GNU split and see how they handle this case?" and then implement your own clean-room solution afterwards.
Alternately, to solve the problem yourself and mention it to someone and have them say "that's how GNU split does it, so why not?"
‘Clean-room reverse engineering’ refers to the practice of having one person look at disassembled source code, spec sheets, actual behaviour, etc. of some program; describe that behaviour to a second person; and having the second person implement the described behaviour.