public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: cygrunsrv v0.94 starts but not stops java.exe
@ 2001-11-08  5:19 Joshua
  2001-11-08  5:34 ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua @ 2001-11-08  5:19 UTC (permalink / raw)
  To: cygwin

    Corinna,

    Thanks for the response.  I should have realized cygrunsrv was designed
for Cygwin apps; it's stated clearly enough in the source.  It's just that
Cygwin's such a great app (thanks to you all), that I want to use it for
everything.

    If I'm brave enough to plunge into the source, the force option you're
thinking about, are you talking about sending a kill to the cygrunsrv
process that's running java.exe or the java.exe process itself (either way
works)?  BCNU//jle

Re: cygrunsrv v0.94 starts but not stops java.exe
To: cygwin at cygwin dot com
Subject: Re: cygrunsrv v0.94 starts but not stops java.exe
From: Corinna Vinschen <cygwin at cygwin dot com>
Date: Thu, 8 Nov 2001 10:46:32 +0100
References: < 000301c1681e$107fc0c0$2ae61718@bdfrd1.tx.home.com >

----------------------------------------------------------------------------
----

Java.exe is not a Cygwin application, right?  So it doesn't understand
the Cygwin signal mechanism.  Cygrunsrv is created to support Cygwin
applications so only the signals are sent to the service application
to stop it.  If the application doesn't stop, cygrunsrv doesn't stop
as well.

We could perhaps add a `force' option for killing the application
as in kill.exe.  Patches gratefully accepted.

Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygrunsrv v0.94 starts but not stops java.exe
  2001-11-08  5:19 cygrunsrv v0.94 starts but not stops java.exe Joshua
@ 2001-11-08  5:34 ` Corinna Vinschen
  0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2001-11-08  5:34 UTC (permalink / raw)
  To: cygwin

On Thu, Nov 08, 2001 at 07:19:21AM -0600, Joshua wrote:
>     Corinna,
> 
>     Thanks for the response.  I should have realized cygrunsrv was designed
> for Cygwin apps; it's stated clearly enough in the source.  It's just that
> Cygwin's such a great app (thanks to you all), that I want to use it for
> everything.
> 
>     If I'm brave enough to plunge into the source, the force option you're

There's no need to be `brave'.  It's just a small bunch of source,
not even 2000 lines of code.  There's a `-s' option to define the
signal which should be used when killing the service app.  If we could
add something like a special signal or a --forcekill option which
doesn't result in a Cygwin kill() call but instead in calling
TerminateProcess... hmm, that's a bit tricky since cygrunsrv has
no access to the Windows PID... but there's a cygwin_internal()
call which allows getting the process table entry which contains
the Windows PID.  Just take a look into Cygwin's kill implementation,
function forcekill().

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygrunsrv v0.94 starts but not stops java.exe
  2001-11-07 22:24 Joshua
@ 2001-11-08  1:46 ` Corinna Vinschen
  0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2001-11-08  1:46 UTC (permalink / raw)
  To: cygwin

On Thu, Nov 08, 2001 at 12:24:47AM -0600, Joshua wrote:
> >     I'm trying to use cygrunsrv to run a java application.  It will start
> > the application just fine, but will not stop it.  Initially, I thought
> that
> > java.exe was acting like a typical UNIX forking daemon as described in the
> > readme and the web.  However, if I understand that problem correctly, it
> is
> > indicated by the cygrunsrv processes dying immediately after they are
> > started?  My cygrunsrv processes do not die until I kill them or the
> > corresponding java.exe process.  If I kill either of the cygrunsrv
> > processes, both die, but the java.exe process lives on.
> >
> >     Now, I'm leaning towards cygrunsrv not sending the correct signal to
> > java.exe to get it to shutdown or java.exe not accepting the signal.  If I
> > run the java app from the command line, a simple CTRL-C stops it.  I tried
> > the basic signal (TERM, HUP, INT, QUIT) with no effect.  Please see the
> > screen capture below.  Any help or references would be
> > appreciated...BCNU//jle

Java.exe is not a Cygwin application, right?  So it doesn't understand
the Cygwin signal mechanism.  Cygrunsrv is created to support Cygwin
applications so only the signals are sent to the service application
to stop it.  If the application doesn't stop, cygrunsrv doesn't stop
as well.

We could perhaps add a `force' option for killing the application
as in kill.exe.  Patches gratefully accepted.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cygrunsrv v0.94 starts but not stops java.exe
@ 2001-11-07 22:24 Joshua
  2001-11-08  1:46 ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua @ 2001-11-07 22:24 UTC (permalink / raw)
  To: cygwin

    Interestingly enough, srvany.exe from the NT resource kit doesn't have
any problem starting/stopping the application as a service.  Of course it
doesn't have the redirection functions of cygrunsrv, which I'd rather use
anyway.

    On further inspection, it appears that cygrunsrv is receiving the stop
command; it's just hanging somewhere.  Would anyone suggest a way for me to
further trace/debug where it's hanging?  BCNU//jle

SERVICE_NAME: orion_wow
DISPLAY_NAME: orion_wow
        TYPE              : 10 WIN32_OWN_PROCESS
        STATE             : 3  STOP_PENDING
                              (STOPPABLE,NOT_PAUSABLE,ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE   : 0  (0x0)
        SERVICE_EXIT_CODE : 0  (0x0)
        CHECKPOINT        : 0x2
        WAIT_HINT         : 0x5208

----- Original Message -----
From: "Joshua" <jle@post.com>
To: <cygwin@cygwin.com>
Sent: Wednesday, 07 November, 2001 01:46
Subject: cygrunsrv v0.94 starts but not stops java.exe


>     Hi,
>
>     I'm trying to use cygrunsrv to run a java application.  It will start
> the application just fine, but will not stop it.  Initially, I thought
that
> java.exe was acting like a typical UNIX forking daemon as described in the
> readme and the web.  However, if I understand that problem correctly, it
is
> indicated by the cygrunsrv processes dying immediately after they are
> started?  My cygrunsrv processes do not die until I kill them or the
> corresponding java.exe process.  If I kill either of the cygrunsrv
> processes, both die, but the java.exe process lives on.
>
>     Now, I'm leaning towards cygrunsrv not sending the correct signal to
> java.exe to get it to shutdown or java.exe not accepting the signal.  If I
> run the java app from the command line, a simple CTRL-C stops it.  I tried
> the basic signal (TERM, HUP, INT, QUIT) with no effect.  Please see the
> screen capture below.  Any help or references would be
> appreciated...BCNU//jle
>
> C:\bin>cygrunsrv -I Orion -p "C:\jdk1.3.1_01\bin\java.exe" -a "-jar
> C:\orion\orion.jar" -c "C:\orion" -1 "C:\orion\orion.out" -2
> "C:\orion\orion.err" -o
>
> C:\bin>net start orion
> The Orion service is starting.
> The Orion service was started successfully.
>
> C:\bin>cygrunsrv -E orion
> cygrunsrv: Error stopping a service: QueryServiceStatus:  Win32 error
1053:
> The service did not respond to the start or control request in a timely
> fashion.
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* cygrunsrv v0.94 starts but not stops java.exe
@ 2001-11-06 23:46 Joshua
  0 siblings, 0 replies; 5+ messages in thread
From: Joshua @ 2001-11-06 23:46 UTC (permalink / raw)
  To: cygwin

    Hi,

    I'm trying to use cygrunsrv to run a java application.  It will start
the application just fine, but will not stop it.  Initially, I thought that
java.exe was acting like a typical UNIX forking daemon as described in the
readme and the web.  However, if I understand that problem correctly, it is
indicated by the cygrunsrv processes dying immediately after they are
started?  My cygrunsrv processes do not die until I kill them or the
corresponding java.exe process.  If I kill either of the cygrunsrv
processes, both die, but the java.exe process lives on.

    Now, I'm leaning towards cygrunsrv not sending the correct signal to
java.exe to get it to shutdown or java.exe not accepting the signal.  If I
run the java app from the command line, a simple CTRL-C stops it.  I tried
the basic signal (TERM, HUP, INT, QUIT) with no effect.  Please see the
screen capture below.  Any help or references would be
appreciated...BCNU//jle

C:\bin>cygrunsrv -I Orion -p "C:\jdk1.3.1_01\bin\java.exe" -a "-jar
C:\orion\orion.jar" -c "C:\orion" -1 "C:\orion\orion.out" -2
"C:\orion\orion.err" -o

C:\bin>net start orion
The Orion service is starting.
The Orion service was started successfully.

C:\bin>cygrunsrv -E orion
cygrunsrv: Error stopping a service: QueryServiceStatus:  Win32 error 1053:
The service did not respond to the start or control request in a timely
fashion.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-08  5:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-08  5:19 cygrunsrv v0.94 starts but not stops java.exe Joshua
2001-11-08  5:34 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2001-11-07 22:24 Joshua
2001-11-08  1:46 ` Corinna Vinschen
2001-11-06 23:46 Joshua

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