From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 383 invoked by alias); 19 Mar 2017 04:14:58 -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: X-Seq: 40866 Received: (qmail 28128 invoked from network); 19 Mar 2017 04:14:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f174.google.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(209.85.217.174):SA:0(0.5/5.0):. Processed in 2.032659 secs); 19 Mar 2017 04:14:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.174 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=xolhmitXz6s4PGW5ufiVTAT1xCdEhFRBnxmsDnf9AIw=; b=lbhoLLSaMDzAq8S9zOLchUQze6Gqz/nHSWvypXg4gASY0R9QYV2Njh4vKbjRnL5atd DSSDVKR71Hya+ZYZqF5k+whSx5i3U1fo2X8Rx6k6ElwGL5UEf9pAelPiYSTCkfni0EW/ NJN6q/h4UJlpR6dubIVy29JyPgi/61iY+6GHkXzY44/6yBa/iOIS3VxNqaRpDcK7Zvdi EqcAen4aIylXbYfWBVd7zJVbvziZ/9NdeWaLhlsmYRspxlQJ7Ej+I0fRKjmWP6UEAkIi Zt2DOLm/ijZYwfyyA/y/69lfXbeZyQWbLGg9MGet8JtY578lpi4qtO7bfC8YqinUUpkE h+qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=xolhmitXz6s4PGW5ufiVTAT1xCdEhFRBnxmsDnf9AIw=; b=uGe8DEOaUFKc+K5sJOCH3mhkXvwLkUCbX7BjLhx65a4OJ6FQPpVhinUKCZi8ORrHYv 3mcC0uYGxuiQ+nKSk5FBUbAFNutYZPivKNxtFn/v1fFDpnnBKKviq/CGcgOEmqt3j70R V3rQhLokLAyIO4fP2xq9thBym01Y8EHYnOCqlPWWLf0roC4KkCjp5o0hKkUNZewQK+oW TGw1DWFzRQUwQ7TAi2zdI+ODGEFyxHGfiWlcicCEZ+J0KOq4S6DMjG3DGFt2fGuzOU6+ 5U7Y/MIURjGBhR1lbUbbEIl5ERP/wgEySVeGGVycJqDhke5y852jd8Dys4aSyLbBDvdC An+g== X-Gm-Message-State: AFeK/H0mr/v9h8PQXkwsLNMJKi6j1HHoAl8vEUYDAbRIp7xtqpNUEdPw3X09SM96qhiHWQ== X-Received: by 10.176.74.155 with SMTP id s27mr8023847uae.143.1489896890030; Sat, 18 Mar 2017 21:14:50 -0700 (PDT) From: Bart Schaefer Message-Id: <170318211538.ZM28371@torch.brasslantern.com> Date: Sat, 18 Mar 2017 21:15:38 -0700 In-Reply-To: <170314082528.ZM26126@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Builtin + process substitution can't be interrupted" (Mar 14, 8:25am) References: <170314082528.ZM26126@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Builtin + process substitution can't be interrupted MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 14, 8:25am, Bart Schaefer wrote: } Subject: Builtin + process substitution can't be interrupted } } Try for example } } % : >(sleep 10) } } Enters zwaitjob() to wait for SIGCHLD and despite dont_queue_signals() the } INT signal is blocked, as also are QUIT and TSTP. Update on this -- examination with a debugger indicates that although INT is blocked, QUIT and TSTP are received. However, they don't call any handler and sigsuspend() just goes back to waiting for CHLD. The INT signal is then received and processed after the child has exited, so it's being held rather than ignored. My current guess at what's happening is that the parent shell treats the process substitution as part of the foreground job, and expects that it will receive the signal and choose whether or not to exit. However, the process substitution is not actually in the TTY process group (it puts itself in its own group, I checked with strace), so it never receives any signals from the keyboard. I'm not sure where to go from there.