Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] add the full range of OpenBSD ptys
- X-seq: zsh-workers 41666
- From: Thierry Ghelew <tlux@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] add the full range of OpenBSD ptys
- Date: Sun, 10 Sep 2017 23:09:17 -0400
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: tlux@xxxxxxxxxx
When more than 15 terminals (tty**) are opened with the default setting
of OpenBSD, zpty module throws an error like:
****
(zpty):zpty:2: can't open pseudo terminal: device not configured
****
This was caused mainly by the limited list of char1[] and char2[]
which didn't represent the full range of OpenBSD tty's names.
The above is highlighted when zpty is used by the shell prompt[1] .
Feedback are always appreciated!
Regards,
Thierry
[1] https://github.com/sindresorhus/pure
---
Src/Modules/zpty.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 3c1bef58f..1c93a1d02 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -254,7 +254,12 @@ get_pty(int master, int *retfd)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
static char char1[] = "pqrsPQRS";
static char char2[] = "0123456789abcdefghijklmnopqrstuv";
-#else /* __FreeBSD__ || __DragonFly__ */
+#elif defined(__OpenBSD__)
+ static char char1[] = "pqrstuvwxyzPQRST";
+ static char char2[] = "0123456789"
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+#else /* __FreeBSD__ || __DragonFly__ || __OpenBSD*/
static char char1[] = "pqrstuvwxyzPQRST";
static char char2[] = "0123456789abcdef";
#endif
--
2.12.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author