mevdschee / 2048.c

Console version of the game "2048" for GNU/Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running via `echo 2048 | /bin/sh` causes 2048 to use 100% CPU.

esthermations opened this issue · comments

I ran into this by accidentally running 2048 from dmenu, which essentially does this.

You can do this in a terminal and the game appears to start normally, but it doesn't accept key input and it uses 100% CPU.

I don't think that something's wrong with 2048.c, because i tested with pacman4console and 2048-cli (from Ubuntu repos) and I had the same problem.

You're right actually, this seems to happen for ncmpcpp and ncmpc as well.

However, bmon does nothing and uses neglible CPU, and top returns 1 and says top: failed tty get.

So I wonder if this sort of situation is something that can be checked for. I don't really know enough about TUI programs to make a suggestion there, though.

nload works fine but can not read keyboard input, top exits as you(@WTok) said and moon-buggy says Fatal error: Cannot read keyboard input and exits.
So I think your idea(exiting with a message in these situations) is a good idea and may be marked as idea or suggestion or something.