Daniel Berger
2006-Oct-17 02:07 UTC
[Win32utils-devel] Fw: mmap 0.2.0 writing value from a child process
I thought I would forward this to see if anyone has any suggestions (other than,
"You shouldn''t use this code in conjunction with fork").
Thanks,
Dan
----- Forwarded Message ----
From: "Park, Chong SuhX" <chong.suhx.park at intel.com>
To: Daniel Berger <djberg96 at yahoo.com>
Sent: Monday, October 16, 2006 3:59:55 PM
Subject: mmap 0.2.0 writing value from a child process
<!--
_filtered {font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
_filtered {
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
_filtered {
}
_filtered {
text-indent:-.25in;
font-family:Wingdings;
}
_filtered {
}
_filtered {
text-indent:-.25in;
font-family:Wingdings;
}
_filtered {font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
_filtered {
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
_filtered {font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
_filtered {
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
_filtered {font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
_filtered {font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
_filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
_filtered {
panose-1:2 3 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.emailstyle17
{font-family:"Trebuchet MS";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.emailstyle18
{font-family:"Trebuchet MS";
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.emailstyle19
{font-family:"Trebuchet MS";
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle20
{
font-family:"Trebuchet MS";
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
_filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{}
-->
Hi Dan,
First of all, I
sincerely appreciate your great contribution. Mmap 0.2.0 is critically
important piece of software for my project and would like to share with an
issue I am found today.
I think it might
be a bug. Try following code and see if it is working. And then, remove comment
# mmap.bar = ''My World'' and run it again. You may find
something interesting
pid1 = fork do
mmap MMap.new(:name => ''alpha'', :size => 2000)
mmap.foo ''Hello''
mmap.bar ''Your World''
sleep 5
mmap.close
end
sleep 1
pid2 = fork do
mmap MMap.open(''alpha'')
# mmap.bar ''My World''
p mmap.foo
p mmap.bar
mmap.close
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/win32utils-devel/attachments/20061016/c840a720/attachment-0001.html
