From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26000 invoked from network); 28 Jan 2021 10:43:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Jan 2021 10:43:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1611830594; b=sTQkTIVYK0bPC0sK/Mjla5NNo5xAmz6WBqQK+pqtRFYG+KvZrwZXDNLGhaVhSzlb4TA5CRgUZq kBO2r8+Fb6u+MNCgorq8T5rajRkFLNMZq0IerOgNqBwJnfbP1SrX/fkyIeX01G24odaWiONatF gTcQJ7sjnAY5+v6yf4TedHbxzyV1+KUoABkVX7DpfSr1zQxcN8I4OWgocOCvcJ+Rbs8baa5pJu KcCM1aa6PGTnS0S1Wl2E2CXw3O3OADmH4XStVIcwluR7uMJ/rMda7wDnNB0rINo/09CX6zv4xZ OGWLdrGg+0X9MV+ifRfW7H3uuMhz0U+TDyxKO6vrDk5cLw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (rcpt-expgw.biglobe.ne.jp) smtp.remote-ip=133.208.98.4; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1611830594; bh=zwXYXaVbEafKU2lzMLS8qB2xzdwKvZ3r04WjCIHzq8Q=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=SSX2PlBZy2W0Oqzx0/W3gPZx5vUQjCn1MGPxgB6MVUe4gfsC3OXmTmvu+6MZA0FPbDvKImh22T SY0daGx+4FXRlMchsVq6dwoSopHGQ+JsHZcfzSnDbz7kgzWh2JUwpnsHtkKaDAtmF/OjVEKW9r 6ql+3e8WFgwEPdaZT9I7Ypa8AKxUyDBb5tvSPaQM9zREXsC+l5WnkASyd+n0xh4HP4YhE2tq58 Wd1e0Wqw7x/yZKhU0nG8sLM4haoyuf8oYHukdmvqglrrgTUs1loseUMlBaxFG/jgDTZVJCiQ57 Hc/iuWhn23peZY+69p90oXOAHttwrTlV93DKmMwIXXCPIg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=z2tH2wBPA1vcVh0HGtA0rEO1f1GSm4bOvqmVQfAFAh8=; b=vUmTTq8/82nBHvg6Bhacii6S+1 h5mOhfhPyYoVHLwYKY9DfJQwVESXNSKn5EgNYpytqdScFbHLL7rLyhasxNIn/y+frDEv+K3ymXH/p M07tGkV9wZfUal0n6Ao25l7sGsNh24BmS6YSqjbtPMsr8E8w3ujhkp0BAd1YCQ9tY6yXqa7RcspMH 56oGgHQ9NhjYrtlMVNIU+J6NUi4lOwlJ1axB6vo2J2xmmywVFmeTzvE6vpVp9tsXRheil+hafJjzF R4TjRR1ih5E1puug20H6dCPI4VArWEzVHSAQBP6DC/6S/Tl9fMIUmBizgA7+I+S9jWC01VfB7oxLL SEQaT3wg==; Received: from authenticated user by zero.zsh.org with local id 1l54ld-0006nC-NX; Thu, 28 Jan 2021 10:43:13 +0000 Authentication-Results: zsh.org; iprev=pass (rcpt-expgw.biglobe.ne.jp) smtp.remote-ip=133.208.98.4; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from rcpt-expgw.biglobe.ne.jp ([133.208.98.4]:53172) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1l54lM-0006f6-Ie; Thu, 28 Jan 2021 10:42:58 +0000 Received: from vc-gw.biglobe.ne.jp by rcpt-expgw.biglobe.ne.jp (hngd/4514161018) with ESMTP id 10SAgoTr011162 for ; Thu, 28 Jan 2021 19:42:50 +0900 Received: from smtp-gw.biglobe.ne.jp ([192.168.154.158]) by vc-gw.biglobe.ne.jp (shby/1011270619) with ESMTP id 10SAgobO022750 for ; Thu, 28 Jan 2021 19:42:50 +0900 X-Biglobe-Sender: Received: from tamac1.yz.yamagata-u.ac.jp ([133.24.84.20]) by smtp-gw.biglobe.ne.jp id TfBmC0A89942; Thu, 28 Jan 2021 19:42:50 +0900 (JST) From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: Possible ZSH bug involving piping ls to less (MSYS2 & Cygwin) Date: Thu, 28 Jan 2021 19:42:50 +0900 References: <00ca01d6f456$656e4aa0$304adfe0$@gmail.com> <541DBFB6-EEF6-406F-BF19-1AB46E468864@kba.biglobe.ne.jp> To: zsh-workers@zsh.org In-Reply-To: <541DBFB6-EEF6-406F-BF19-1AB46E468864@kba.biglobe.ne.jp> Message-Id: <9F63235F-4FF4-4D65-A87B-8AEF3FD4F3C7@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3445.104.17) X-Biglobe-Spnum: 24917 X-Seq: 47885 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: > 2021/01/27 19:14, Jun T 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