zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: zpty for Cygwin and strange Zsh test hanger
@ 2000-06-27  7:10 Andrej Borsenkow
  2000-06-27  7:20 ` PATCH: zpty for Cygwin Andrej Borsenkow
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-06-27  7:10 UTC (permalink / raw)
  To: ZSH workers mailing list

Cygwin is using SVR4-style ptys without STREAMS support. The attached
patch makes it possible to compile zpty.c under Cygwin. I can also start
bash as subprocess and read/write there. Unfortunately, both completion
tests and nslookup function hang unde Cygwin. I was not able to use gdb
(it does not show even stacktrace), but I decided to try a single
testsuite under Unix ... and to my surpise it hung there as well. Look
(this is after installing new zsh, so it must be identical with what is
built using ``make check''):

bor@itsrm2% cd Test; ZTST_verbose=10 ../Src/zsh -f
/tools/src/zsh/Test/ztst.zsh
/tools/src/zsh/Test/53completion.ztst
ZTST_getsect: read section name: prep
ZTST_getchunk: read code chunk:
  . $ZTST_srcdir/comptest
ZTST_execchunk: status 0
ZTST_getchunk: read code chunk:
  mkdir comp.tmp
  cd comp.tmp
ZTST_execchunk: status 0
ZTST_getchunk: read code chunk:
  comptestinit -z $ZTST_testdir/../Src/zsh
ZTST_execchunk: status 0
ZTST_getchunk: read code chunk:
  mkdir dir1
  mkdir dir2
  touch file1
  touch file2
ZTST_execchunk: status 0
ZTST_getchunk: read code chunk:

ZTST_getsect: read section name: test
ZTST_test: looking for new test
ZTST_test: examining line:

ZTST_test: examining line:
  comptest $':                                                  '
ZTST_getchunk: read code chunk:
  comptest $':                                                  '
ZTST_test: examining line:
>line: {: }{}
ZTST_getredir: read redir for '>':
line: {: }{}
DESCRIPTION:{file}
DI:{dir1}
DI:{dir2}
FI:{file1}
FI:{file2}
line: {: dir1/}{}
line: {: dir2/}{}
line: {: file1}{}
line: {: file2}{}
line: {: dir1/}{}
line: {: dir2/}{}
ZTST_test: examining line:

Running test: directories and files
ZTST_test: expecting status: 0


It does NOT hang if I run ``make check''!

Any idea?

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH: zpty for Cygwin
  2000-06-27  7:10 PATCH: zpty for Cygwin and strange Zsh test hanger Andrej Borsenkow
@ 2000-06-27  7:20 ` Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 2000-06-27  7:20 UTC (permalink / raw)
  To: Andrej Borsenkow, ZSH workers mailing list

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

> 
> Cygwin is using SVR4-style ptys without STREAMS support. The attached
> patch makes it possible to compile zpty.c under Cygwin.

Sorry, I forgot to attach.

-andrej

[-- Attachment #2: zpty.diff --]
[-- Type: application/octet-stream, Size: 992 bytes --]

--- Src/Modules/zpty.c.org	Wed May 17 07:42:44 2000
+++ Src/Modules/zpty.c	Fri Jun 23 17:38:08 2000
@@ -155,9 +155,11 @@
 /**** maybe we should use configure here */
 /**** and we certainly need more/better #if tests */
 
-#if defined(__SVR4) || defined(sinix)
+#if defined(__SVR4) || defined(sinix) || defined(__CYGWIN__)
 
+#if !defined(__CYGWIN__)
 #include <sys/stropts.h>
+#endif
 
 static int
 get_pty(int master, int *retfd)
@@ -183,6 +185,7 @@
 	close(mfd);
 	return 1;
     }
+#if !defined(__CYGWIN__)
     if ((ret = ioctl(sfd, I_FIND, "ptem")) != 1)
        if (ret == -1 || ioctl(sfd, I_PUSH, "ptem") == -1) {
 	   close(mfd);
@@ -201,13 +204,14 @@
 	   close(sfd);
 	   return 1;
        }
+#endif /* !defined(__CYGWIN__) */
 
     *retfd = sfd;
 
     return 0;
 }
 
-#else /* ! (defined(__SVR4) || defined(sinix)) */
+#else /* ! (defined(__SVR4) || defined(sinix) || defined(__CYGWIN__)) */
 
 static int
 get_pty(int master, int *retfd)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-27  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-27  7:10 PATCH: zpty for Cygwin and strange Zsh test hanger Andrej Borsenkow
2000-06-27  7:20 ` PATCH: zpty for Cygwin Andrej Borsenkow

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).