public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: - <lopiuh@googlemail.com>, cygwin@cygwin.com
Subject: Re: Exitcode is 0 when killing a cygwin initiated process via taskmanager
Date: Tue, 23 Dec 2014 01:50:00 -0000	[thread overview]
Message-ID: <1526002507.20141223043753@yandex.ru> (raw)
In-Reply-To: <CAMhmPJ3DDmUX0x0pij-NKOnoKJhe18=EROkdhr+f3O8Zjiih2w@mail.gmail.com>

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@yandex.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

  reply	other threads:[~2014-12-23  1:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23  0:38 -
2014-12-23  1:50 ` Andrey Repin [this message]
2014-12-23  2:34 -
2014-12-23  7:41 ` Marco Atzeri
2014-12-23 11:09 -
2014-12-23 11:37 ` Marco Atzeri
2014-12-23 13:00 ` -
2014-12-23 19:47   ` cyg Simple
2014-12-24  1:56   ` -

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1526002507.20141223043753@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=lopiuh@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).