zsh-workers
 help / color / mirror / code / Atom feed
From: Thierry Ghelew <tlux@ghelew.net>
To: zsh-workers@zsh.org
Subject: [PATCH] add the full range of OpenBSD ptys
Date: Sun, 10 Sep 2017 23:09:17 -0400	[thread overview]
Message-ID: <20170911030917.9300-1-tlux@ghelew.net> (raw)

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


             reply	other threads:[~2017-09-11  3:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170911031011epcas1p366010bccd08586557775765776b7c55b@epcas1p3.samsung.com>
2017-09-11  3:09 ` Thierry Ghelew [this message]
2017-09-11  9:16   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170911030917.9300-1-tlux@ghelew.net \
    --to=tlux@ghelew.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).