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

Errno 25 on first book example #2865

Open
createyourpersonalaccount opened this issue Mar 21, 2025 · 0 comments
Open

Errno 25 on first book example #2865

createyourpersonalaccount opened this issue Mar 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@createyourpersonalaccount
Copy link

createyourpersonalaccount commented Mar 21, 2025

The issue

Using pipes

I've tried to compile the source as-is from the book on the blue house example (the first example). I've invoked it with:

$ printf "hello house\n" | ./direct_mode

but I get no output. On secondary inspection I figured out that after the first getchar() call, errno is set to 25, which seems to be:

#define ENOTTY          25      /* Not a typewriter */

Using input redirection

With redirection, e.g.

$ ./direct_mode <(printf "hello house\n")

I get again nothing; same if I use < msg where msg is a file containing the message. Somewhat amusingly however, if I redirect the Makefile into it, I get garbage:

$ ./direct_mode < Makefile | head
1
2
A3
M3
_3
C3
P3
P3
F3
L3

also

$ ./direct_mode < Makefile | tail
ferror: Inappropriate ioctl for device
P3
O3
R3
T3
:3

3
errno = 25
4

LANG|LC_CTYPE|TERM

I've tested on the following:

declare -x COLORTERM="truecolor"
declare -x GDM_LANG="en_US.UTF-8"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x TERM="tmux-256color"
declare -x TERMINFO="/usr/lib/kitty/terminfo"
declare -x TERM_PROGRAM="tmux"
declare -x TERM_PROGRAM_VERSION="3.3a"

and

declare -x COLORTERM="truecolor"
declare -x GDM_LANG="en_US.UTF-8"
declare -x GNOME_TERMINAL_SCREEN="/org/gnome/Terminal/screen/494ed266_2453_41a2_a7a9_57b6f3508b86"
declare -x GNOME_TERMINAL_SERVICE=":1.194"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x TERM="xterm-256color"

notcurses version

ncurses 3.0.13 installed from source

terminal name and version

I used both kitty 0.26.5 and GNOME Terminal 3.46.8 using VTE 0.70.6 +BIDI +GNUTLS +ICU +SYSTEMD, from apt in Debian 12.

Compilation flags for example program

I used -L/usr/local/lib -lnotcurses -lnotcurses-core.

@createyourpersonalaccount createyourpersonalaccount added the bug Something isn't working label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant