blob: 1684cb87934d614757afef1bb9c35f502bcb9997 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
https://bugs.gentoo.org/973412
From 0be9f4f2b7c4202b183f65aa65ecfd32f565385d Mon Sep 17 00:00:00 2001
From: Joe Allen <jhallenworld@gmail.com>
Date: Wed, 6 May 2026 09:34:34 -0400
Subject: [PATCH] Fix assign to stdin, use freopen instead issue
--- a/joe/main.c
+++ b/joe/main.c
@@ -755,7 +755,10 @@
/* Close stdin, so that if user kills the copying the program feeding stdin sees a SIGPIPE */
/* It won't if there are any extra file descriptors open */
fclose(stdin);
- stdin = fopen("/dev/tty", "rb");
+ if (!freopen("/dev/tty", "rb", stdin))
+ {
+ /* This should not fail */
+ }
}
}
|