[rt.cpan.org #64575] Start callback not called with Strawberry Perl 5.10 / 5.12

[email protected] ("Haiko Strotbek via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Fri Jan 07 10:14:39 2011: Request 64575 was acted upon.
Transaction: Ticket created by [email protected]
       Queue: Win32-Daemon
     Subject: Start callback not called with Strawberry Perl 5.10 / 5.12
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64575 >


Hi,

after upgrading Win32::Daemon from 2002xxxx to 20101014, the module
failed to start callback in my script.

After some debugging I figgured out that the main thread id won't be set
when working with callbacks. So a PostMessage() call tries to access a
non existing thread instead of the main thread and the start message is
never processed.

I could fix the problem by adding the following lines at Daemon.xs:1229

		if( 0 == gMainThreadId )
		{	
			gMainThreadId = GetCurrentThreadId();
		}

Perhaps you can verify the patch and include it in the next version?


Regards

Haiko Strotbek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.