Displaying 20 results from an estimated 24 matches for "service_stop".
2006 May 22
9
win32/service... still with problems.
Hello list,
In my quest to get Mongrel working as service for win32, found some
problems with win32/service that make it impossible to solve.
Attached is the simplest service script I could do with ruby, which
depends on win32/service.
I found that doing anything complex in service_stop (killing threads,
doing file handling, even sleeping for 0.25 seconds). crash the
service with backtraces (of the service) like this:
dead_service.rb:119:in `service_main'': uninitialized constant RUNNING
(NameError)
from U:/Programming/Sources/ruby/try/dead_service.rb:131
Just commentin...
2006 Feb 20
1
Fwd: Win32::Daemon, Problems with service_stop
...____________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An embedded message was scrubbed...
From: "Luis Lavena" <luislavena at gmail.com>
Subject: Win32::Daemon, Problems with service_stop
Date: Sun, 19 Feb 2006 16:14:43 -0300
Size: 2641
Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20060219/1e4db8d0/attachment.eml
2006 Dec 07
0
Fwd: win32-service problems with patch
...ate SHOULD == RUNNING when service_main starts (I had a problem
where it was 0).
* EventHookHash was a global variable that Ruby didn''t know about, so it
was being garbage collected before the process terminated (especially
when the ruby service control was trying to dispatch an event)
* service_stop was never being called that I could tell - now I
forcefully dispatch the event after the loop in the ruby green thread,
before exiting.
I didn''t do anything to handle exceptions within the spawned green
threads for the events dispatched. Not sure that anything needs to be done.
I have...
2005 Dec 01
1
service_cli.rb
...y with a Riki-specific control script.
So I can just do:
riki.rb:
----
$LOAD_PATH.unshift File.dirname(__FILE__)
require ''service_cli''
class RikiDaemon < Win32::Daemon
def self.setup(s)
s.binary_path_name = "ruby #{__FILE__} --service"
end
...service_main/service_stop...
end
service_cli(''Riki'', RikiDaemon)
----
So now the "control" and "daemon" functions are both handled from the same
generic script (I added an odd but effective command line parameter of
--service which means its getting started by win32 and should call
d...
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...t any required variables.
- // Be sure to periodically call ReportSvcStatus() with
+ // TO_DO: Declare and set any required variables.
+ // Be sure to periodically call ReportSvcStatus() with
// SERVICE_START_PENDING. If initialization fails, call
// ReportSvcStatus with SERVICE_STOPPED.
// Create an event. The control handler function, SvcCtrlHandler,
// signals this event when it receives the stop control code.
- ghSvcStopEvent = CreateEvent (
- NULL,
- TRUE,
- FALSE,
- NULL
- );
+ ghSvcStopEvent = CreateEvent (
+ NULL,
+ TRUE,
+ FALS...
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...t any required variables.
- // Be sure to periodically call ReportSvcStatus() with
+ // TO_DO: Declare and set any required variables.
+ // Be sure to periodically call ReportSvcStatus() with
// SERVICE_START_PENDING. If initialization fails, call
// ReportSvcStatus with SERVICE_STOPPED.
// Create an event. The control handler function, SvcCtrlHandler,
// signals this event when it receives the stop control code.
- ghSvcStopEvent = CreateEvent (
- NULL,
- TRUE,
- FALSE,
- NULL
- );
+ ghSvcStopEvent = CreateEvent (
+ NULL,
+ TRUE,
+ FALS...
2006 May 21
0
Mongrel as win32-service, round3.
...nted the past days (into the beta
gem, 0.3.13). Now the service part works better.
Still, a few things must be worked to get rails 100% in this env.
I also commented into the file a few things about how service work:
You cannot do file operations (like openning a file and logging into
it) inside service_stop, or actually stopping the listeners threads
user by mongrel make the service hang and report an error.
Found that the rb_funcall() to service_stop (if defined) is done
previously to setting the service state to SERVICE_STOP_PENDING, a
thing that sometimes make the service manager think the service...
2006 Jun 20
1
Portable Daemon
I am wrapping up work on a "PortableDaemon" gem. It is pure Ruby and
wraps win32-service and the daemons gems. Allowing users to write
against a common interface (pretty much the win32-service call back
structure).
Under Linux it captures a couple signals to support the service_stop
(TERM) and service_paramchange (USR1). It also adds a "run" feature to
the win32 implementation with _very_ simple support for debugging at
the console of the wrapped service.
It probably belongs in its own "project" as it is a Linux/Win32
wrapper and written in pure Ruby, but...
2017 Oct 27
0
Fwd: Network interface regression on F26 VM after 4.13/4.12 kernel update
...equest (5 scripts)
> Oct 26 14:25:56 son-of-builder nm-dispatcher[8018]: req:5 'down' [ens3]: start running ordered scripts...
> Oct 26 14:25:56 son-of-builder nm-dispatcher[8018]: req:6 'hostname': start running ordered scripts...
> Oct 26 14:26:06 son-of-builder audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
> Oct 26 14:26:21 son-of-builder NetworkManager[824]: <info>...
2014 Aug 23
2
CTDB 50.samba: ERROR: smb.conf cache create failed
...few cycles
# for anything else
net serverid wipe
if [ -n "$CTDB_SERVICE_NMB" ] ; then
nice_service "$CTDB_SERVICE_NMB" start || die "Failed to start nmbd"
fi
service "$CTDB_SERVICE_SMB" start || die "Failed to start samba"
}
service_stop ()
{
service "$CTDB_SERVICE_SMB" stop
if [ -n "$CTDB_SERVICE_NMB" ] ; then
service "$CTDB_SERVICE_NMB" stop
fi
}
######################################################################
# Show the testparm output using a cached smb.conf to avoid delays due...
2005 Sep 08
11
Stopping services
I''m back to getting stuff to run as a Windows service, and am running
in to a problem. My service (a Daemon ruby class) installs and starts
fine, but when I try to stop it, I get:
C:\workspaces\default\tahoe>ruby script\service stop
script/service:77:in `stop'': An exception occurred in the service
when handling
the control request. (Win32::ServiceError)
from
2014 Jul 18
1
ctdb do not start nmbd if serving AD
...cycles
# for anything else
net serverid wipe
if [ -n "$CTDB_SERVICE_NMB" ] ; then
nice_service "$CTDB_SERVICE_NMB" start || die "Failed to start nmbd"
fi
nice_service "$CTDB_SERVICE_SMB" start || die "Failed to start
samba"
}
service_stop ()
{
service "$CTDB_SERVICE_SMB" stop
if [ -n "$CTDB_SERVICE_NMB" ] ; then
service "$CTDB_SERVICE_NMB" stop
fi
}
######################################################################
# Show the testparm output using a cached smb.conf to avoid delays due...
2007 Aug 07
0
[ win32utils-Bugs-12881 ] Cannot wait on Process - service_daemon/service_main
...-mswin32]
Service 0.5.2
Process 0.5.3
I am using code based on the examples tdaemon.rb and tdaemon_ctl.rb
Within tdaemon.rb/service_main() I launch an exe using Process.create and then use Process.waitpid2(process_id) to catch it if it crashes and then restart it.
This works fine but when I call service_stop to kill the process it the call blocks until I kill the exe externally.
Any suggestions ?
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=12881&group_id=85
2004 Feb 06
0
Daemon method name changes
...he risk of annoying you all to death with seemingly trivial things,
I was thinking that we should change a couple method names. I know that
I myself had suggested "on_stop", "on_pause", etc, for the event hooks
in the Daemon class. However, I think I will change those to
"service_stop", "service_pause", etc. This isn''t a major issue, since
we haven''t released the code for that yet.
Along those lines, however, I think we should change "worker" to
"service_main". It''s a little more explicit and a little more in line...
2004 Feb 10
0
Daemon help
...mon.rb" file in ''C:\''. I also have
a daemonctrl.rb script in another directory. It installs fine, but I
can never start it successfully. What am I doing wrong?
Dan
# daemon.rb in ''C:\''
require "win32/service"
include Win32
class Daemon
def service_stop
File.open("c:\\foo.log","a+"){ |f| f.puts "foo stopped"
}
end
def service_main
while state == RUNNING
File.open("c:\\foo.log","a+"){ |f| f.puts "foo
running" }
sleep 5
end
end
end
d = Daemon.new
d.mainloop
# END daemon.rb...
2011 Dec 21
1
Deleting active MRSW lock, expect failure
In recent wine I have started to get these frequently, when I exit different applications.
err:ntdll:RtlDeleteResource Deleting active MRSW lock (0x112034), expect failure
It doesn't happen always and I have just ignored it, because it doesn't seem to cause problems. But it's annoying
Anyone else have this?
2014 Aug 15
1
ctdb event script 50.samba does not start smbd
...cycles
# for anything else
net serverid wipe
if [ -n "$CTDB_SERVICE_NMB" ] ; then
nice_service "$CTDB_SERVICE_NMB" start || die "Failed to start nmbd"
fi
nice_service "$CTDB_SERVICE_SMB" start || die "Failed to start
samba"
}
service_stop ()
{
service "$CTDB_SERVICE_SMB" stop
if [ -n "$CTDB_SERVICE_NMB" ] ; then
service "$CTDB_SERVICE_NMB" stop
fi
}
######################################################################
# Show the testparm output using a cached smb.conf to avoid delays due...
2013 Dec 20
0
Wine release 1.7.9
...ctions.
server: Set process start time a bit later.
Detlef Riekenberg (1):
tools: make_authors is no longer used.
Dmitry Timoshkov (10):
msiexec: Make service thread do nothing by waiting for the kill event instead of using an empty loop.
msiexec: MSI service should report SERVICE_STOPPED when appropriate.
include: Add taskschd.idl.
msiexec: Make sure that SERVICE_STOPPED status is really sent to SCM.
crypt32: Add support for decoding serial number property in the certificate attributes.
include: Add more Task Scheduler interface definitions.
secur32...
2005 May 14
4
Problems with custom service and webrick
...end
def service_start
File.open(@log,"a+"){ |fh| fh.puts "Service
started" }
end
def service_main
while state == RUNNING
File.open(@log, "a+"){ |fh| fh.puts "Service
running" }
sleep 5
end
end
def service_stop
File.open(@log, "a+"){ |fh| fh.puts "Service
stopped" }
exit
end
end
web_daemon = WebrickDaemon.new
web_daemon.mainloop
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail...
2015 Dec 04
0
Wine release 1.8-rc3
...with CoGetMalloc().
Olivier F. R. Dierick (2):
shlwapi: SHFreeShared returns TRUE when passed NULL handle.
shlwapi/tests: Test SHFreeShared with NULL handle.
Piotr Caban (2):
comctl32: Set listview focus in WM_LBUTTONDOWN.
msiexec: Avoid broken pipe error caused by setting SERVICE_STOPPED state twice.
Qian Hong (3):
ntdll/tests: Add SIMD exception test for floating point invalid operation fault.
ntdll: Silence useless fixme message when handling SIMD floating point invalid operation exception.
ntdll/tests: Restore old value in a more context independent way.
S...