delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/22/20:51:03

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=nkHVsZDWtNnzJE6w
5JGGajd9D4puXV/XfUsCN4z42zlHkCWaM9xlNQOJhYs954Msc8t8ILF3r7Vo33VN
8xn5OuhyoXiCN2BbIRSdClfzjWOcjmdEVSQz6vF23Sh+OfK4LBeczyJd0igeLCFa
H0fDBeSRIoE8E9je7lDHbgIofK0=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=CfRyL+ZCEYT1MbXTJ1bd8U
RYDsg=; b=rVPEUkAihZRswSQH4rt5FcMIjqlH2YqVUofEjgVMvpoHcq8+aRm3D4
GdHFDa5rTRa/3Vvgmah+hlElGygNNd4KU207H1kuagazd6mMEC9dVz+5gxIzHfaM
EdHAnm1VgCGGuXMwNnnb0yFRGdF/1+nU2qeVLU7NwYg7mqrbEn7oY=
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=1.7 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_BODY_URIBL_PCCC,KAM_FROM_URIBL_PCCC,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtp.ht-systems.ru
Date: Tue, 23 Dec 2014 04:37:53 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1526002507.20141223043753@yandex.ru>
To: - <lopiuh AT googlemail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Exitcode is 0 when killing a cygwin initiated process via taskmanager
In-Reply-To: <CAMhmPJ3DDmUX0x0pij-NKOnoKJhe18=EROkdhr+f3O8Zjiih2w@mail.gmail.com>
References: <CAMhmPJ3DDmUX0x0pij-NKOnoKJhe18=EROkdhr+f3O8Zjiih2w AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, -!

> 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)

What do you mean by "canceled" exit code, pretty please?


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 23.12.2014, <04:37>

Sorry for my terrible english...


--
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