Signals

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Signals

javaeng
I wrote some simeple test code in Java to trap signals. Seems to work
well, I then ported it to cygwin. The code listens for the SIGINT and
prints a message. When I hit Ctrl-C while it is running the proper signal
gets sent and traped.

I then go to a second shell/Window  and do a ps on the process running and
try to send a kill -s SIGINT <pid>. In cygwin this does not work the
process dies with out traping the signal.

Was wondering if anyone else ran into this and what silly thing I am doing
that causes the issue?

Thanks!






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

Reply | Threaded
Open this post in threaded view
|

Re: Signals

Christopher Faylor-2
On Wed, Jan 04, 2006 at 11:25:27AM -0700, John Buttitto wrote:

>I wrote some simeple test code in Java to trap signals. Seems to work
>well, I then ported it to cygwin. The code listens for the SIGINT and
>prints a message. When I hit Ctrl-C while it is running the proper signal
>gets sent and traped.
>
>I then go to a second shell/Window  and do a ps on the process running and
>try to send a kill -s SIGINT <pid>. In cygwin this does not work the
>process dies with out traping the signal.
>
>Was wondering if anyone else ran into this and what silly thing I am doing
>that causes the issue?

Unless SIGINT is trapped in the Cygwin process, Cygwin terminates
non-cygwin processes when it receives a CTRL-C.


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

Reply | Threaded
Open this post in threaded view
|

Re: Signals

Christopher Faylor-2
In reply to this post by javaeng
On Wed, Jan 04, 2006 at 11:25:27AM -0700, John Buttitto wrote:

>I wrote some simeple test code in Java to trap signals. Seems to work
>well, I then ported it to cygwin. The code listens for the SIGINT and
>prints a message. When I hit Ctrl-C while it is running the proper signal
>gets sent and traped.
>
>I then go to a second shell/Window  and do a ps on the process running and
>try to send a kill -s SIGINT <pid>. In cygwin this does not work the
>process dies with out traping the signal.
>
>Was wondering if anyone else ran into this and what silly thing I am doing
>that causes the issue?
>
>Thanks!

There was a problem with the setup.ini file on sourceware.org.  It should
be fixed now but it will take a while to propagate.

cgf


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

Reply | Threaded
Open this post in threaded view
|

Re: Signals

Igor Peshansky
In reply to this post by javaeng
On Wed, 4 Jan 2006, John Buttitto wrote:

> I wrote some simeple test code in Java to trap signals. Seems to work
> well, I then ported it to cygwin. The code listens for the SIGINT and

If you really mean Java here, this is off-topic for this list, as it has
nothing to do with Cygwin.  There are no JVMs linked with Cygwin -- they
are all native Win32 applications.  As such, they are unlikely to
understand Cygwin signals.

> prints a message. When I hit Ctrl-C while it is running the proper signal
> gets sent and traped.
>
> I then go to a second shell/Window  and do a ps on the process running and
> try to send a kill -s SIGINT <pid>. In cygwin this does not work the
> process dies with out traping the signal.
>
> Was wondering if anyone else ran into this and what silly thing I am doing
> that causes the issue?

I think we need to see a small reproducible testcase, with the exact
instructions on how to reproduce your problem.  We also need to see the
details of your problem, as requested in the Cygwin problem reporting
guidelines at <http://cygwin.com/problems.html> (please read the *whole*
document before replying).  Note that a Java testcase won't do, as the JVM
is not a Cygwin executable.
HTH,
        Igor
--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_    [hidden email] | [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-' old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


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

Reply | Threaded
Open this post in threaded view
|

Re: Signals

Christopher Faylor-2
In reply to this post by Christopher Faylor-2
On Wed, Jan 04, 2006 at 01:35:52PM -0500, Christopher Faylor wrote:

>On Wed, Jan 04, 2006 at 11:25:27AM -0700, John Buttitto wrote:
>>I wrote some simeple test code in Java to trap signals. Seems to work
>>well, I then ported it to cygwin. The code listens for the SIGINT and
>>prints a message. When I hit Ctrl-C while it is running the proper signal
>>gets sent and traped.
>>
>>I then go to a second shell/Window  and do a ps on the process running and
>>try to send a kill -s SIGINT <pid>. In cygwin this does not work the
>>process dies with out traping the signal.
>>
>>Was wondering if anyone else ran into this and what silly thing I am doing
>>that causes the issue?
>>
>>Thanks!
>
>There was a problem with the setup.ini file on sourceware.org.  It should
>be fixed now but it will take a while to propagate.

Sorry.  Somehow I responded to the wrong message.  How embarrassing.

cgf


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

Reply | Threaded
Open this post in threaded view
|

RE: Signals

Dave Korn
In reply to this post by Christopher Faylor-2
Christopher Faylor wrote:

> On Wed, Jan 04, 2006 at 11:25:27AM -0700, John Buttitto wrote:
>> I wrote some simeple test code in Java to trap signals. Seems to work
>> well, I then ported it to cygwin. The code listens for the SIGINT and
>> prints a message. When I hit Ctrl-C while it is running the proper
>> signal gets sent and traped.
>>
>> I then go to a second shell/Window  and do a ps on the process running
>> and try to send a kill -s SIGINT <pid>. In cygwin this does not work the
>> process dies with out traping the signal.
>>
>> Was wondering if anyone else ran into this and what silly thing I am
>> doing that causes the issue?
>>
>> Thanks!
>
> There was a problem with the setup.ini file on sourceware.org.  It should
> be fixed now but it will take a while to propagate.
>
> cgf

  Yes, but on the other hand I think the best way to get the IP address of the
local machine would be something like

curl 'http://ipid.shat.net/iponly/' 2> /dev/null | egrep -o
'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'  | sort | uniq


    cheers,
      DaveK
--
Can't think of a witty .sigline today....



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