[riot-notifications] [RIOT-OS/RIOT] sys/shell: Exit the shell on ctrl-D (#10788)

Martine Lenders notifications at github.com
Thu Sep 19 08:58:48 CEST 2019

> Does wrapping the shell in a while loop solve everyone's concerns with exiting on ^D?

So this is how `shell_run()` currently looks like:


Currenlty, ^D is just ignored (`handle_input_line()` sees `*pos <= ' '` so nothing happens). The functionality introduced here causes the function to go into the if condition and break that loop. Adding another while loop around the existing while loop however would have the same behavior, just with another while loop around: Hitting ^D would finish the inner while loop, the outer while loop would then cause another iteration of the inner while loop. So I don't really get the point of having this then except for the `handle_input_line()` not being entered.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190918/a8e9b546/attachment.htm>

More information about the notifications mailing list