Berger, Daniel
2005-Nov-23 14:42 UTC
[Win32utils-devel] Some code change suggestions of thenwin32-service package
> -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Park Heesob > Sent: Wednesday, November 23, 2005 6:16 AM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] Some code change suggestions of > thenwin32-service package > > > Hi, > > I''d like to suggest some code modifications and tests. > > In service.c > line # 50 : Commet out 1 line > // SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0); > > line # 260 : Insert 4 lines > if(rb_respond_to(self,rb_intern("service_init"))){ > rb_funcall(self,rb_intern("service_init"),0); > } > SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0); > > In Ruby source > Insert ''service_init'' method for initialization > > I tested with long initialization and it worked fine. > > def service_init > for i in 1..10 > File.open("c:\\test2.log","a+"){ |f| f.puts("#{i}") } > sleep 10 > end > end > > I think it is not a perfect solution but at least better than > the current > verison. > > Regards, > > Park HeesobThis looks reasonable. Did we still want to use SetTheServiceStatus(SERVICE_START_PENDING, NO_ERROR, checkpoint, 0) somewhere during initialization, or does the creation of a service_init method eliminate the need for it? Thanks, Dan
Seemingly Similar Threads
- Another patch of win32-service for nice startup.
- Fwd: win32-service problems with patch
- [PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
- [PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
- [Fwd: Thanks for win32-service]