[Win32utils-devel] Arguments to Service.start()

Daniel Berger djberg96 at gmail.com
Sat Aug 10 05:36:31 UTC 2013


On Thu, Aug 8, 2013 at 6:55 PM, Heesob Park <phasis at gmail.com> wrote:

> Hi,
>
> 2013/8/9 Sean Karlage <sean.karlage at uky.edu>:
> > Hi,
> >
> > I'm working on a script utilizing win32-service. Do arguments to
> > Service.start() have to be strings? Or can they be more complex data
> types
> > (e.g. hashes)? I tried passing in hashes but they were not getting
> passed to
> > service_main.
> >
> It is string by the spec of Windows Service.
> You can convert any object into string using Marshal.dump and revert
> using Marshal.load.
>
> > Additionally, when I am passing strings, I notice that not all arguments
> > that I pass actually make it to service_main. For example:
> >
> > Service.start('ServiceName', nil, 'string1', 'string2')
> >
> > When I look at the arguments in service_main, they are:
> >
> > ['ServiceName', 'string1']
> >
> > 'string2' never actually makes it to service_main. What might be the
> cause
> > of this?
> >
> Why you ignore my previous email about this issue?
> (http://rubyforge.org/pipermail/win32utils-devel/2013-August/001904.html)
> I already stated it is a bug.
>

I've pushed the fix for this.

Thanks,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130809/1930e3e7/attachment.html>


More information about the win32utils-devel mailing list