+1 Em ter., 29 de abr. de 2025 às 08:47, Ville Juven <ville.ju...@unikie.com.invalid> escreveu:
> +1 from here as well. POSIX compliance should take precedence over > everything else including introduction of regressions. > > -Ville > ________________________________ > From: Tomek CEDRO <to...@cedro.info> > Sent: Tuesday, April 29, 2025 2:38 PM > To: dev@nuttx.apache.org <dev@nuttx.apache.org> > Subject: Re: [VOTE] Change setlogmask behavior to POSIX standard > > Thank you Michal, good catch! :-) > > +1 from me :-) > > I just wonder how to communicate the change to folks that may use > existing functionality and what would be the proposed fix to get the > same behavior after update (i.e. send logs to /dev/null) :-) > > Tomek > > On Tue, Apr 29, 2025 at 8:39 AM Michal Lenc <michall...@seznam.cz> wrote: > > > > Hi all, > > > > I've submitted pull request that changes setlogmask function behavior to > > the one expected by POSIX standard > > < > https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnuttx%2Fpull%2F16280&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380742686%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=veeI1dctqyXsFg3tCHDdplfpVyE9Rr%2FhHUtBqcYnGhk%3D&reserved=0 > <https://github.com/apache/nuttx/pull/16280>>. The description of the > > change is provided in the mailing list, to summarize it, our > > implementation uses zero argument to set logging mask to zero and thus > > disable the logging at all. However, POSIX clearly states that passing > > zero argument should not modify the current logging mask, but just > > return the old one. We should change the behavior to comply with POSIX > > standards here. > > > > As Tomek suggested, we should vote here first, because this is a > > potential breaking change for existing applications. So let's vote > > for/against the change. > > > > It's also worth noting that POSIX probably (or at least I haven't found > > a way) doesn't allow to disable all logging at runtime, just to set the > > mask to the highest priority (lowest amount of messages, just emergency > > logs) with LOG_EMERG (or any other priority you want). Nevertheless, I > > consider the POSIX (and Linux) compatibility more important in this case > > and vote for the change. > > > > Thanks, > > > > Michal > > > > > -- > CeDeROM, SQ7MHZ, > https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomek.cedro.info%2F&data=05%7C02%7Cville.juven%40unikie.com%7Cb184563caea14146cffe08dd87126ca1%7C9207ba3377314e38abf1c7183f53f8c3%7C0%7C0%7C638815235380775227%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GKd2ExS6U%2BMH4mpy93eFtCshfVNLIZ8m8kua0j97yDU%3D&reserved=0 > <http://www.tomek.cedro.info/> >