delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/22/19:38:42

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=C3vDjSgpbd5ni5xuQKh8rxdtmblmR
+7FYI5JGL/Kz9lRsVQaFwvcCK9s2W8IGzSlB/008ttdGCK8izEOhveItbPAKbFM2
5U2/xHP3X67IaR8Khd7O3Q2e9J2USk8zLHZlEQEjT/xKePEWQL9qkdM+9AC8NsIt
An+qbbqzDO5SmE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=dRH6Jmf+HNa53OL06YNrfi9qeow=; b=m8O
NtoAONzkReAijPomqfUAvNjhK4oUECa2twaaUleWsVjdPICk8tKv3CM1AeSLSJyY
lh1QmGAWHRKfTTjaZeAy2Qbm6xS+v2Q5C7r0BgrKTbLmE28EX7GZ9UE4mG4FyZ7w
LbZqAjORGCgaKha/mpV/e30jzgcg6DvVrZBdfZeE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-vc0-f181.google.com
MIME-Version: 1.0
X-Received: by 10.220.202.69 with SMTP id fd5mr8839254vcb.46.1419295102234; Mon, 22 Dec 2014 16:38:22 -0800 (PST)
Date: Tue, 23 Dec 2014 01:38:22 +0100
Message-ID: <CAMhmPJ3DDmUX0x0pij-NKOnoKJhe18=EROkdhr+f3O8Zjiih2w@mail.gmail.com>
Subject: Exitcode is 0 when killing a cygwin initiated process via taskmanager
From: - <lopiuh AT googlemail DOT com>
To: cygwin AT cygwin DOT com

Hi all,

I have a script running banana after killing a process (rsync, but
that is unimportant) through Taskmanager (End process in process tab).

It is, that the killed process exits  immediately with exitcode 0 (!)
and the bash script itself continues, which can lead to havoc because
not knowing something was canceled (continuing to mive directories
etc).

Win7, CYGWIN_NT-6.1-WOW64 Gizmo-PC 1.7.33-2(0.280/5/3) 2014-11-13
15:45 i686 Cygwin

simple to reproduce:
START script.sh
#!/usr/bin/bash
less some_file
echo "result: $?" >| erg_file

erg_file contains: result: 0 after killing less through process taskmanager

Any idea how to solve (get the "canceled" exit code? Remember: The
script continues like a normal finish of the command)

Thanks

lopiuh

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019