Re: Problem with Storable on Windows



Matthew Keene wrote:
I'm trying to use Storable in conjunction with IPC::Open3 in order to
send complex data structures between the parent and child processes. Unfortunately, although this seems to work a treat under Linux (Fedora
Core 4), it doesn't seem to work on Windows, returning the following
message:


Magic number checking on storable file failed at blib\lib\Storable.pm
(autosplit into blib\lib\auto\Storable\fd_retrieve.al) line 323, at
D:\Data\Perl\DBAsyncWorker.pl line 13

[code snipped]

You don't have a problem with Storable, but with IPC::Open3. I modified your code a bit and found that the data the caller sent never made it to the client. So you try to thaw an empty string, which Storable complains about. Reading from the pipe in the worker never succeeds. I'm not an expert, but googling for problems with IPC::Open3 on Windows will show a few threads. If you don't find a solution there, I would suggest doing the communication over sockets. At least that works (it does for me).
This could perhaps all be related to select working only on sockets under Windows.


Thomas

--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
.



Relevant Pages

  • Re: TCP Client socket in zweiten Thread
    ... > Windows CE3.0 Application Programming von Nick Grattan: ... and Winsock itself is based around the Berkeley socket library. ... Die non-blocking Sockets verhindern Aktionen, die das Programm blockieren ...
    (microsoft.public.de.vc)
  • Re: Socket communication on multihomed box
    ... LAN route before USB ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
    (microsoft.public.win32.programmer.networks)
  • Re: ooRexx - inter-program communication
    ... under Windows. ... I'm only considering pairs/triples/more of apps running on a single platform ... Can ooRexx programs communicate with each other? ... Are there any example programs showing use of sockets? ...
    (comp.lang.rexx)
  • Re: Socket communication on multihomed box
    ... LAN route before USB ... The thing is that connection MUST always stay open. ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
    (microsoft.public.win32.programmer.networks)
  • Re: linux to windows porting help
    ... I am working on a project that involves porting c programs from ... linux environment to windows environment. ... Any effort to move some decent software to the Windows platform ... all the networking headers with, add the relevant sockets ...
    (comp.programming)