WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Closing SSH session with tce-ab open uses 99% CPU.  (Read 256 times)

Offline code

  • WikiUser
  • *
  • Posts: 18
Closing SSH session with tce-ab open uses 99% CPU.
« on: August 25, 2017, 05:27:59 AM »
If you SSH into TinyCore and then run tce-ab and then press enter ~ . to close the SSH session, tce-ab will have init as a parent and use 100% CPU.

If you do it again the two will each use 50% of the CPU.


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9611
Re: Closing SSH session with tce-ab open uses 99% CPU.
« Reply #1 on: August 25, 2017, 10:05:35 AM »
I don't think this is a bug. When a parent (shell in this case) dies, there is no signal sent to its children. Any other program, not just tce-ab, would continue running and get reparented to init.

If you close the shell like that, forcing it instead of a normal logout/exit, you should expect such from all programs.
The only barriers that can stop you are the ones you create yourself.

Offline code

  • WikiUser
  • *
  • Posts: 18
Re: Closing SSH session with tce-ab open uses 99% CPU.
« Reply #2 on: August 25, 2017, 11:55:47 AM »
Okay.

Any idea why it starts to use 100% CPU though? Normally it uses 0% CPU.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9611
Re: Closing SSH session with tce-ab open uses 99% CPU.
« Reply #3 on: August 25, 2017, 11:30:13 PM »
It runs a read loop, and read returns immediately if the pty disappears, I believe.
The only barriers that can stop you are the ones you create yourself.