Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible ZSH bug involving piping ls to less (MSYS2 & Cygwin)
- X-seq: zsh-workers 47885
- From: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Possible ZSH bug involving piping ls to less (MSYS2 & Cygwin)
- Date: Thu, 28 Jan 2021 19:42:50 +0900
- Archived-at: <https://zsh.org/workers/47885>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-01/9F63235F-4FF4-4D65-A87B-8AEF3FD4F3C7%40kba.biglobe.ne.jp>
- In-reply-to: <541DBFB6-EEF6-406F-BF19-1AB46E468864@kba.biglobe.ne.jp>
- List-id: <zsh-workers.zsh.org>
- References: <00ca01d6f456$656e4aa0$304adfe0$@gmail.com> <541DBFB6-EEF6-406F-BF19-1AB46E468864@kba.biglobe.ne.jp>
> 2021/01/27 19:14, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> [3] I used strace command to find the following:
>
> When ls exits, the main zsh gets SIGCHLD and calls wait_for_processes().
> In this function, signals.c, line 543, it calls
> /* pn->pid is the pid of ls */
Sorry, something went wrong with my MUA. the last two lines should read
In this function, signals.c, line 543, it calls
killpg(pn->pid, 0) /* pn->pid = pid_of_ls */
> Is there anyone familiar with Cygwin/MSIS2?
Note for someone who tries to fix this problem on MSYS2:
The current zsh git master does not compile well on MSYS2.
At least you need to use
% ./configure --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin
The resulting zsh has a problem related with symlink (which is not supported
on MSYS2), but it can be used for debugging purpose.
Or you can use the patch below.
This is a part of the patches used in MSYS2's zsh package.
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index 161b073b4..de1d675c4 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -852,6 +852,13 @@ extern short ospeed;
# define IS_DIRSEP(c) ((c) == '/')
#endif
+#ifdef __MSYS__
+/* MSYS2 symlink() cannot create a symbolic link to a non existing file */
+# ifdef HAVE_SYMLINK
+# undef HAVE_SYMLINK
+# endif
+#endif
+
#if defined(__GNUC__) && (!defined(__APPLE__) || defined(__clang__))
/* Does the OS X port of gcc still gag on __attribute__? */
#define UNUSED(x) x __attribute__((__unused__))
diff --git a/configure.ac b/configure.ac
index 16dafac05..7eef49a8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2706,7 +2706,7 @@ if test "x$aixdynamic" = xyes; then
zsh_cv_sys_dynamic_strip_exe="${zsh_cv_sys_dynamic_strip_exe=yes}"
zsh_cv_sys_dynamic_strip_lib="${zsh_cv_sys_dynamic_strip_lib=yes}"
zsh_cv_shared_environ="${zsh_cv_shared_environ=yes}"
-elif test "$host_os" = cygwin; then
+elif test "$host_os" = cygwin -o "$host_os" = msys; then
DL_EXT="${DL_EXT=dll}"
##DLLD="${DLLD=dllwrap}"
DLLD="${DLLD=$CC}"
@@ -2976,7 +2976,7 @@ if test "x$dynamic" = xyes; then
if $strip_libldflags && test "$zsh_cv_sys_dynamic_strip_lib" = yes; then
LIBLDFLAGS="$LIBLDFLAGS -s"
fi
- if test "$host_os" = cygwin; then
+ if test "$host_os" = cygwin -o "$host_os" = msys; then
INSTLIB="install.cygwin-lib"
UNINSTLIB="uninstall.cygwin-lib"
fi
@@ -3014,7 +3014,7 @@ AC_SUBST(SHORTBOOTNAMES)
AC_SUBST(INSTLIB)dnl
AC_SUBST(UNINSTLIB)dnl
-if test "$host_os" = cygwin; then
+if test "$host_os" = cygwin -o "$host_os" = msys; then
EXTRAZSHOBJS="$EXTRAZSHOBJS zsh.res.o"
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author