Re: SIGINT default behavior

2009-10-08 Thread Robert Pendell
On Thu, Oct 8, 2009 at 12:19 AM, Pedro Izecksohn wrote:
 Larry Hall wrote:
 I, Pedro Izecksohn, wrote:

   The default behavior is not always the same. I also got:
 ferror (stdin):
   and
 ferror (stdin): Interrupted system call
   and the expected behavior of just the exit code 130.


 Try Cygwin 1.7 http://cygwin.com/#beta-test.

 $ cat /proc/version
 CYGWIN_NT-6.0 1.7.0(0.214/5/3) 2009-10-03 14:33

  The beta version gives the same inconsistent results.

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



I was unable to reproduce this bug on 1.7.  Compiled using GCC 4.3.4
on 1.7.0-62.  Gave exit code 130 every time.  I used your test case to
do the test.

shi...@balthasar ~
$ gcc --version
gcc (GCC) 4.3.4 20090804 (release) 1
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


shi...@balthasar ~
$ cat /proc/version
CYGWIN_NT-6.1-WOW64 1.7.0(0.214/5/3) 2009-10-03 14:33


Robert Pendell
shi...@elite-systems.org

A perfect world is one of chaos.

Thawte Web of Trust Notary
CAcert Assurer

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



Re: SIGINT default behavior

2009-10-08 Thread Pedro Izecksohn
Robert Pendell shi...@... wrote:

 I was unable to reproduce this bug on 1.7.  Compiled using GCC 4.3.4
 on 1.7.0-62.  Gave exit code 130 every time.  I used your test case to
 do the test.

  May be I did not express myself well:

  When ctrl c is pressed, it always give exit code 130. The
inconsistencies are ferror (stdin) and perror behaviors.

  I'll not be on Cygwin before noon.

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



Re: SIGINT default behavior

2009-10-08 Thread Pedro Izecksohn
I, Pedro Izecksohn pedro.izecks...@... wrote:
 Robert Pendell shi...@... wrote:

 I was unable to reproduce this bug on 1.7.  Compiled using GCC 4.3.4
 on 1.7.0-62.  Gave exit code 130 every time.  I used your test case to
 do the test.

  May be I did not express myself well:

  When ctrl c is pressed, it always give exit code 130. The
 inconsistencies are ferror (stdin) and perror behaviors.

  What I understand as a bug is: fgets should not return after SIG_DFL
caught SIGINT.

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



Re: SIGINT default behavior

2009-10-08 Thread Corinna Vinschen
On Oct  8 05:53, Pedro Izecksohn wrote:
 I, Pedro Izecksohn pedro.izecks...@... wrote:
  Robert Pendell shi...@... wrote:
 
  I was unable to reproduce this bug on 1.7.  Compiled using GCC 4.3.4
  on 1.7.0-62.  Gave exit code 130 every time.  I used your test case to
  do the test.
 
   May be I did not express myself well:
 
   When ctrl c is pressed, it always give exit code 130. The
  inconsistencies are ferror (stdin) and perror behaviors.
 
   What I understand as a bug is: fgets should not return after SIG_DFL
 caught SIGINT.

Using your testcase, I can't reproduce this issue under Cygwin 1.7.
Neither in a Windows console window, nor in Xterm under X.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



Re: SIGINT default behavior

2009-10-08 Thread Christopher Faylor
On Thu, Oct 08, 2009 at 05:53:47AM -0300, Pedro Izecksohn wrote:
I, Pedro Izecksohn pedro.izecks...@... wrote:
 Robert Pendell shi...@... wrote:

 I was unable to reproduce this bug on 1.7. ??Compiled using GCC 4.3.4
 on 1.7.0-62. ??Gave exit code 130 every time. ??I used your test case to
 do the test.

 ??May be I did not express myself well:

 ??When ctrl c is pressed, it always give exit code 130. The
 inconsistencies are ferror (stdin) and perror behaviors.

  What I understand as a bug is: fgets should not return after SIG_DFL
caught SIGINT.

I can reproduce this.  It is a bug.  I'll fix it ASAP.

cgf

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



Re: SIGINT default behavior

2009-10-08 Thread Christopher Faylor
On Thu, Oct 08, 2009 at 09:43:32AM -0400, Christopher Faylor wrote:
On Thu, Oct 08, 2009 at 05:53:47AM -0300, Pedro Izecksohn wrote:
I, Pedro Izecksohn pedro.izecks...@... wrote:
 Robert Pendell shi...@... wrote:

 I was unable to reproduce this bug on 1.7. ??Compiled using GCC 4.3.4
 on 1.7.0-62. ??Gave exit code 130 every time. ??I used your test case to
 do the test.

 ??May be I did not express myself well:

 ??When ctrl c is pressed, it always give exit code 130. The
 inconsistencies are ferror (stdin) and perror behaviors.

  What I understand as a bug is: fgets should not return after SIG_DFL
caught SIGINT.

I can reproduce this.  It is a bug.  I'll fix it ASAP.

This should be fixed in today's snapshot, when it shows up.

http://cygwin.com/snapshots/

FWIW, it's a pretty old bug.

cgf

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



Re: SIGINT default behavior

2009-10-07 Thread Larry Hall (Cygwin)

On 10/07/2009 11:10 PM, Pedro Izecksohn wrote:

   The default behavior is not always the same. I also got:
ferror (stdin):
   and
ferror (stdin): Interrupted system call
   and the expected behavior of just the exit code 130.



Try Cygwin 1.7 http://cygwin.com/#beta-test.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

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



Re: SIGINT default behavior

2009-10-07 Thread Pedro Izecksohn
Larry Hall wrote:
 I, Pedro Izecksohn, wrote:

   The default behavior is not always the same. I also got:
 ferror (stdin):
   and
 ferror (stdin): Interrupted system call
   and the expected behavior of just the exit code 130.


 Try Cygwin 1.7 http://cygwin.com/#beta-test.

$ cat /proc/version
CYGWIN_NT-6.0 1.7.0(0.214/5/3) 2009-10-03 14:33

  The beta version gives the same inconsistent results.

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