On 8/2/23 13:29, Yoann Congal wrote: > On 7/30/23 10:59, Masahiro Yamada wrote: >> On Sat, Jul 29, 2023 at 12:23 AM Yoann Congal <yoann.congal@xxxxxxxx> wrote: .../... >>> * Should all oldconfig/syncconfig/... exit with an error when trying to prompt on a closed stdin? (I might be able to send a patch for this one) >> >> No. >> I have seen multiple scripts piping the 'yes' command to Kconfig. >> There is no reason to prohibit pipe or redirection. > > I agree, I would not want to prohibit pipe or redirection. > > I'm specifically talking about a *closed* stdin. A closed stdin is a case were we're 100% sure that we'll never get a valid value. This is why I propose the following check : > - closed stdin > - default value is not valid (eg "" for a hex or int) > If these two conditions are true when prompting, then exit with an error instead of what happens currently : starting an infinite loop. > > Would you accept something like this? I've sent a patch to make it more clear/concrete : [PATCH] kconfig: avoid an infinite loop in oldconfig/syncconfig https://lore.kernel.org/linux-kbuild/20230803164022.2232051-1-yoann.congal@xxxxxxxx/T/#u Regards, -- Yoann Congal Smile ECS - Tech Expert