Nice. :) -------------- next part -------------- An embedded message was scrubbed... From: Jamey Cribbs <cribbsj at oakwood.org> Subject: Thanks for win32-service Date: Fri, 11 Nov 2005 11:33:13 -0500 Size: 2505 Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20051111/5b46cd4f/Thanksforwin32-service.eml
Park Heesob
2005-Nov-23 13:15 UTC
[Win32utils-devel] Some code change suggestions of then win32-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 Heesob