Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: CTRL-C shouldn't exit on embedded platforms #57

Closed
turon opened this issue May 21, 2016 · 4 comments
Closed

cli: CTRL-C shouldn't exit on embedded platforms #57

turon opened this issue May 21, 2016 · 4 comments
Assignees

Comments

@turon
Copy link
Contributor

turon commented May 21, 2016

This line of code is dangerous when compiled for an embedded platform:
https://github.com/openthread/openthread/blob/master/src/cli/cli_serial.cpp#L106

Accidentally pressing CTRL-C in your CLI terminal will halt execution and require a reset.
Perhaps it would be okay if a proper watchdog is implemented on the platform.

@jwhui
Copy link
Member

jwhui commented May 21, 2016

I assume @darconeous added this because he wanted an easy way to exit the emulated code. However, I'm not sure this is necessary since termios.c_lflag in serial.c does not disable the ISIG flag.

@darconeous , what do you think about removing the explicit handling of Ctrl+C in cli_serial.cpp?

@darconeous
Copy link
Contributor

I believe I still ran into some problems. It definitely warrants further investigation to figure out a way to make this work without catching the CTRL-C code.

@jwhui
Copy link
Member

jwhui commented May 21, 2016

FWIW, I just tried removing the referenced CTRL-C case from master HEAD and I was able to use CTRL-C to exit the process on both macos and ubuntu.

darconeous added a commit that referenced this issue May 23, 2016
This was originally here because of some misconfigured TTY settings,
and can cause problems when running on embedded devices.

Since the misconfigured TTY settings have been addressed, this check
is no longer needed.
jwhui pushed a commit that referenced this issue May 23, 2016
… (#64)

This was originally here because of some misconfigured TTY settings,
and can cause problems when running on embedded devices.

Since the misconfigured TTY settings have been addressed, this check
is no longer needed.
@darconeous
Copy link
Contributor

Fixed by #64.

vaas-krish pushed a commit to vaas-krish/openthread that referenced this issue May 23, 2017
…HREAD-84 to master

* commit '39eb9bce1369d5c8ec6372838cbb02659265e5e6':
  Cleanup magic numbers.
wgtdkp pushed a commit to wgtdkp/openthread that referenced this issue Dec 22, 2020
schinchani referenced this issue in SiliconLabs/openthread May 19, 2021
… gcc warnings

Merge in WMN_STACKS/openthread from bugfix/OPENTHREAD-1155-Fix_ProprietaryChannelPage_GCCWarnings to staging/bugfix/OPENTHREAD-1155-Fix_ProprietaryChannelPage_GCCWarnings

* commit '6bc7ae7813664c4c0b2808ae256cd7e9bb7c23ba':
  Fix for OPENTHREAD-1155.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants