[Win32utils-devel] Some code change suggestions of then win32-service package
Park Heesob
phasis at nownuri.net
Wed Nov 23 08:15:40 EST 2005
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 Heesob
More information about the win32utils-devel
mailing list