<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 10/27/2010 10:35 AM, Sunil Mushran wrote:
<blockquote cite="mid:4CC862D7.2080703@oracle.com" type="cite">
<blockquote type="cite">
<pre wrap="">+ while ((isspace(*p) || *p == '\n') && len--)
Also there is a corner bug when the target string was nothing but all
consists of whitespaces:when the 'len' reaches 0, '*p' is actually
accessing the invalid byte which is ahead of string address. it should be:
+ while ((len--) && (isspace(*p) || (*p == '\n')))
</pre>
</blockquote>
<pre wrap=""><!---->
Yes. Make sure Srini fixes this. ;)
</pre>
</blockquote>
made this change<br>
<blockquote cite="mid:4CC862D7.2080703@oracle.com" type="cite">
<pre wrap="">A monitor for a monitor is classic over-engineering. If open/read/readdir
are failing, it assumes that the cluster is not up or debugfs is not mounted.
Occam's Razor. If former, try again after some timeout. If latter, print
a discreet message.
We don't want multiple o2hbmonitors running. Easy to do using a semaphore.
I have left that for Srini. ;)
</pre>
</blockquote>
is there any naming convention for creating a semaphore? Is the
following fine?<br>
key=(key_t)o2cb_crc32("o2hbmonitor")<br>
ret=semget(key, 2, IPC_CREAT);<br>
</body>
</html>