Re: RFE: enable buffering on null-terminated data

2024-03-11 Thread Carl Edquist via GNU coreutils General Discussion
On Sun, 10 Mar 2024, Zachary Santer wrote: On Sun, Mar 10, 2024 at 4:36 PM Carl Edquist wrote: Out of curiosity, do you have an example command line for your use case? My use for 'stdbuf --output=L' is to be able to run a command within a bash coprocess. Oh, cool, now you're talking! ;)

Fix race conditions in timeout(1)

2024-03-11 Thread Pádraig Brady
There was a narrow race condition reported at: https://github.com/coreutils/coreutils/issues/82 Then I noticed another related race condition in the case of failing fork(). Both should be addressed by the attached. cheers, PádraigFrom c1cf5148a1c6302d27661ff0af772de1e7dbb2b6 Mon Sep 17 00:00:00

Re: Fix race conditions in timeout(1)

2024-03-11 Thread Pádraig Brady
On 11/03/2024 15:17, Pádraig Brady wrote: There was a narrow race condition reported at: https://github.com/coreutils/coreutils/issues/82 Then I noticed another related race condition in the case of failing fork(). Both should be addressed by the attached. Actually the second one to ensure pr

Re: 'wc -m' and combining characters

2024-03-11 Thread Pádraig Brady
On 10/03/2024 15:16, Nick wrote: I'm attempting to learn about UTF-8. My question is about how wc counts "combining characters", as discussed here . I made two files, one with "LATIN CAPITAL LETTER A WITH DIAERESIS" called p1.txt. The other wi

Re: 'wc -m' and combining characters

2024-03-11 Thread Nick
El 2024-03-11 14:33 PYST, Pádraig Brady escribió: > On 10/03/2024 15:16, Nick wrote: > > Markus Kuhn's FAQ says "A combining character is not a full > > character by itself" but wc is saying that it is, no? > It's a fair point. Libre Office for example will count as one > character. Thank you.

Re: 'wc -m' and combining characters

2024-03-11 Thread enh
not particularly? define "character"... i think Apple/Swift is the only major proponent of "character == extended grapheme cluster[https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries]";? plan 9's wc used `-r` (for "rune") to make it clearer that it was counting code points. coreutil

Re: RFE: enable buffering on null-terminated data

2024-03-11 Thread Zachary Santer
On Mon, Mar 11, 2024 at 7:54 AM Carl Edquist wrote: > > (In my coprocess management library, I effectively run every coproc with > --output=L by default, by eval'ing the output of 'env -i stdbuf -oL env', > because most of the time for a coprocess, that's whats wanted/necessary.) Surrounded by 's