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

Juan I Carrano notifications at github.com
Tue Sep 10 14:59:11 CEST 2019

There's a couple of uses for this functionality which I had not thought of before:

- Simple user/pass login: One could put the shell in a while(1) loop, preceded by a login prompt function. This would only drop you to the shell if you had the correct user/password. After using the shell you go back to the login prompt by typing ctrl-d.
- What happens if the file object used by stdin is closed while there is a thread waiting on getchar? The shell gets an EOF and exits. This can happen if stdio is implemented in some way other than the UART (e.g. bluetooth). There we can see that the shell exiting is not such an exceptional circumstance.

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/20190910/a9b8ae0a/attachment-0001.htm>

More information about the notifications mailing list