From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43430-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.1 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 0f4807d2 for ; Mon, 10 Sep 2018 16:29:49 +0000 (UTC) Received: (qmail 24614 invoked by alias); 10 Sep 2018 16:29:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43430 Received: (qmail 12829 invoked by uid 1010); 10 Sep 2018 16:29:36 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.12):SA:0(-6.9/5.0):. Processed in 3.294351 secs); 10 Sep 2018 16:29:36 -0000 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180910162254euoutp021b6b7438d9e8f9def1e4c1816db7e389~TFnGVsT3u2645026450euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1536596575; bh=6IIONE6VLXP47Hh9VzN9XqW7AoPA/8XEq3vssGrb4/g=; h=Date:From:To:Subject:In-Reply-To:References:From; b=uuKspkiRuSeAa3QZf5rxXoOf6jXAbh46jdiSGqaBFnCVwLEd1E+6VbbsZw1cGoP+3 I3WJDOz7xpZbjXHeTJUQER8E2ZjRN/8m750L4sUEQXCv1l6hWN0qrQqR/mlXg9w7pb EF4NuI1/cER+1yP7o+cC8iWkuCVl2QPDrtxcz4a8= X-AuditID: cbfec7f4-84fff700000010c6-f8-5b969a5ee0e1 Date: Mon, 10 Sep 2018 17:22:51 +0100 From: Peter Stephenson To: Subject: Re: W02jobs.ztst hangs with zsh 5.6.1 In-Reply-To: <1536594632.827723.1503050288.42A44FB8@webmail.messagingengine.com> Organization: SCSC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djP87pxs6ZFG8zpE7Q42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGV83LmIrWCpQcWnaXZYGxjc8XYycHBICJhLnV5xi7GLk4hAS WMEosfTGWSinj0ni2eQ9rBBOL5NE34afzDAtX4/9gKpaziixaPJcRriqD3u62CCcM4wStyYv ZgNpERK4wCjx/j8HiM0ioCpxc9NVdhCbTcBQYuqm2YwgtoiApMS15tNgtrCAnsSFlkNgvZwC ARIrts4Hsjk4+AWEJC4020JcYS9xdM9JJhCbV0BQ4uTMJywgNrOAvMT2t3OYQW6QEPjMJvH4 2BIWiKIyiV0PZ0C94CLx+/UVNghbWOLV8S3sELaMxP+d85kgmtsZJdZMes0O4fQwSmw6eocR ospaou/2RUaQi5gFNCXW79KHCDtKzH03mwkkLCHAJ3HjrSDEQXwSk7ZNZ4YI80p0tAlBVKtJ 7GjayjiBUXkWkhdmIXlhFsL8BYzMqxjFU0uLc9NTi43yUsv1ihNzi0vz0vWS83M3MQKTwel/ x7/sYNz1J+kQowAHoxIP74WsadFCrIllxZW5hxglOJiVRHh36QCFeFMSK6tSi/Lji0pzUosP MUpzsCiJ8/JppUULCaQnlqRmp6YWpBbBZJk4OKUaGIV3Ok9YZnfh9TUJpbr6xzrRGuW/uRyP FCa9P7I47K9H+Yt3b6zXXe+VPPAnZoLnjNvTTK3+sVtzpf2ZEP/YYBbn8wU33Zdn3Jyzqa3t 7sl7Zdd6Hor7ZE/fEf324s0p0ovPl6SKzd5xSNrJt2TRoQrVwkLDZo++NJ3yL+Uu328eLSyX /m0qXajEUpyRaKjFXFScCABfw2DXAgMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42I5/e/4Xd3YWdOiDXZck7A42PyQyYHRY9XB D0wBjFF6NkX5pSWpChn5xSW2StGGFkZ6hpYWekYmlnqGxuaxVkamSvp2NimpOZllqUX6dgl6 GV83LmIrWCpQcWnaXZYGxjc8XYycHBICJhJfj/1g7GLk4hASWMooMWPZFRaIhIzEpysf2SFs YYk/17rYQGwhgW4mielLqyAazjBKdM/exgzhXGCUeHV8OlgHi4CqxM1NV8FsNgFDiambZjOC 2CICkhLXmk+D2cICehIXWg6BTeUVcJbY/mgS2GZOgQCJFVvns0EMPcoiseb/ZqBBHBz8AkIS F5ptIS6ylzi65yQTRK+gxMmZT8B6mQV0JE6sOsYMYctLbH87h3kCo/AsJGWzkJTNQlK2gJF5 FaNIamlxbnpusZFecWJucWleul5yfu4mRmBUbDv2c8sOxq53wYcYBTgYlXh4L2RNixZiTSwr rsw9xCjBwawkwrtLByjEm5JYWZValB9fVJqTWnyI0RQYGBOZpUST84ERm1cSb2hqaG5haWhu bG5sZqEkznveoDJKSCA9sSQ1OzW1ILUIpo+Jg1OqgTF0rq1t5yn32FNG23If3jU+c3dp6M7r C2qDU1kz981Y0G4xPc0s+4VutcQq/pRZ3YtMmCYHpde/lLt0dr+p6sErz8//O7I+YIH+/rW3 mL9+EVNMvfLikPpJluOf1whtaL6kfedGzdX6jY51JjJhRqvt0pncp5zfrhc96c3BKS+/2ryQ 0nnjdidGiaU4I9FQi7moOBEAfs82NaACAAA= Message-Id: <20180910162253eucas1p19cc5b33c6d6c22226f4d908ca564b7ad~TFnFPnHg12300523005eucas1p1F@eucas1p1.samsung.com> X-CMS-MailID: 20180910162253eucas1p19cc5b33c6d6c22226f4d908ca564b7ad X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180910102119epcas5p384cea9ba5749eb81be99c4f4d85a954e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180910102119epcas5p384cea9ba5749eb81be99c4f4d85a954e References: <20180910103226eucas1p2c84a98abec87724d039d0f14a33c3d28~TA1GZtpYp3066130661eucas1p2z@eucas1p2.samsung.com> <524677991.1156882.1536578389106@mail2.virginmedia.com> <20180910151428eucas1p17e62bab7b6d218d45d0b82f21af8df1f~TErVhouMz0413304133eucas1p1x@eucas1p1.samsung.com> <1536594632.827723.1503050288.42A44FB8@webmail.messagingengine.com> On Mon, 10 Sep 2018 15:50:32 +0000 Daniel Shahaf wrote: > Peter Stephenson wrote on Mon, 10 Sep 2018 16:14 +0100: > > It's unlikely zpty is going to get enough love and attention to be > > robust enough for what we really need here. > > > > I wonder if there is some replacement we could use that someone might > > already know about? The Python pty module looked like it might be > > usable, but I encountered half a dozen Python-style illogicalities before > > getting a dozen lines into a programme, so we'll need some existing > > script to start with. > > Could you explain what that replacement (in Python or anything else) > needs to do? Are you asking for a program that launches ../Src/zsh in a > pty and then writes the stty(1) 'susp' character to that pty? (At this > point the program could just send SIGTSTP directly, too; I'm not sure > if that's an option.) As near a direct replacement for ztpy as possible, but basically all it needs to be able to do is spwan a slave running zsh, write to that, and read back from it. You'd have thought that wasn't too hard, but experience suggests otherwise. I got some life with the Ruby pty module, based on the example in the documentation. I haven't worked out how to get the right file descriptors in the right place, so this is a non-working exmaple of particular things we want to do more generically --- i.e. pass in instructions to read and write, then look at the results returned, rather than hard wire. pws require 'pty' master, slave = PTY.open read, write = IO.pipe ::ENV["PS1"] = "" pid = spawn("zsh", "-fV", "+Z", :in=>read, :out=>slave) read.close # we dont need the read slave.close # or the slave write.puts 'print $ZSH_VERSION' p master.gets # Write is a normal pipe so this doesn't actually work. write.puts "stty susp \^z" write.puts 'sleep 5' # \C-z: again, this isn't actually going to the terminal. write.printf "%c", 26 p master.gets # hoping to see something involving a stopped / suspended message.