[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    Re: [Konsole-devel] Review Request: Add process info gathering support on OpenBSD
From:       Vadim Zhukov <persgray () gmail ! com>
Date:       2012-10-03 10:14:57
Message-ID: CAMy=nGGqj1zLgLbyRtstwEV6cs+u+7aV2p+qc1YJgNnzjRc+Uw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


03.10.2012 13:57 пользователь "Jekyll Wu" <adaptee@gmail.com> написал:
>
> This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106129/
>
> Sorry for the so late response. I have been blocked by setting up an
OpenBSD environment for testing this patch. The funny thing is in the same
time I have managed to set up the testing environment for NetBSD and
DragonFly without much trouble :)

M-m-m... Official OpenBSD Ports tree doesn't have (working) KDE 4; I'm
actually working on it. This patch was tested at least by one another
person. I can help you in setting up OpenBSD testing environment, if you
wish.

> Back to this patch. Since I (and probably Kurt also) can't test it now,
the safe way is to prepare a patch which does not contain any modification
to existing code/class.  So please use a separate class for OpenBSD.

Acknowledged. I'll send new revision ASAP.

> Also, leave alone that fix for allocating kinfo_proc in the wrong unit in
class FreeBSDProcessInfo. I will try to fix it in a separate commit.

Okay.

> Beside that, there are some minor coding style issues.

Will fix them too. Sorry for C-style, it's much easier to follow one manual
(OpenBSD) than for (OpenBSD, Qt and KDE). :)

> src/ProcessInfo.cpp (Diff revision 2)
>
> private:
>
> 681
>
>         void    *buf = NULL, *nbuf;
>
> konsole code generally uses the form of
>
>    void* ptr = ...;
>
> Also, it is preferred to have only one declaration per line.
>
> There are similar issues in the following code.
>
>
> src/ProcessInfo.cpp (Diff revision 2)
>
> private:
>
> 719
>
>         for (char **p = argv; *p != NULL; p++)
>
> konsole code generally uses the kdelibs style:
>
> for (....) {
>
> }
>
>
> src/ProcessInfo.cpp (Diff revision 2)
>
> private:
>
> 754
>
>         envp = readProcArgs(aPid, KERN_PROC_ENV);
>
> This part feels so "C", which makes it out of place among other "C++"
code. Also applies to the readProcArgs method above.
>
> But that is just my taste. If you feel uncertain about making it more
"C++" like, just ignore this issue.
>
>
> - Jekyll
>
>
> On August 23rd, 2012, 7:29 p.m., Vadim Zhukov wrote:
>
> Review request for Konsole and Jekyll Wu.
> By Vadim Zhukov.
>
> Updated Aug. 23, 2012, 7:29 p.m.
>
> Description
>
> ATM Konsole does not support gathering process information on OpenBSD.
I've a patch adding such support.
> The main idea is to extend already existing FreeBSDProcessInfo class. I
renamed it to a BSDProcessInfo and added a few #ifs here and there. If
that's not desirable, I could create separate OpenBSDProcessInfo class.
>
> I've also fixed a few nits regarding calling C routines (prepended "::"
to sysctl() and such; added kWarning() printouts if they fail). If needed I
can do them as a separate diff.
>
> Testing
>
> On OpenBSD-CURRENT.
>
> Diffs
> src/ProcessInfo.cpp (32c86b1)
>
> View Diff

[Attachment #5 (text/html)]

<p>03.10.2012 13:57 пользователь &quot;Jekyll Wu&quot; &lt;<a \
href="mailto:adaptee@gmail.com">adaptee@gmail.com</a>&gt; написал:<br> \
&gt;<br> &gt; This is an automatically generated e-mail. To reply, visit: <a \
href="http://git.reviewboard.kde.org/r/106129/">http://git.reviewboard.kde.org/r/106129/</a><br>
 &gt;<br>
&gt; Sorry for the so late response. I have been blocked by setting up an OpenBSD \
environment for testing this patch. The funny thing is in the same time I have \
managed to set up the testing environment for NetBSD and DragonFly without much \
trouble :)</p>

<p>M-m-m... Official OpenBSD Ports tree doesn&#39;t have (working) KDE 4; I&#39;m \
actually working on it. This patch was tested at least by one another person. I can \
help you in setting up OpenBSD testing environment, if you wish.</p>

<p>&gt; Back to this patch. Since I (and probably Kurt also) can&#39;t test it now, \
the safe way is to prepare a patch which does not contain any modification to \
existing code/class.   So please use a separate class for OpenBSD.</p>

<p>Acknowledged. I&#39;ll send new revision ASAP.</p>
<p>&gt; Also, leave alone that fix for allocating kinfo_proc in the wrong unit in \
class FreeBSDProcessInfo. I will try to fix it in a separate commit.</p> <p>Okay.</p>
<p>&gt; Beside that, there are some minor coding style issues. </p>
<p>Will fix them too. Sorry for C-style, it&#39;s much easier to follow one manual \
(OpenBSD) than for (OpenBSD, Qt and KDE). :)</p> <p>&gt; src/ProcessInfo.cpp (Diff \
revision 2)<br> &gt;<br>
&gt; private:<br>
&gt;<br>
&gt; 681<br>
&gt;<br>
&gt;                 void       *buf = NULL, *nbuf;<br>
&gt;<br>
&gt; konsole code generally uses the form of <br>
&gt;<br>
&gt;       void* ptr = ...;<br>
&gt;<br>
&gt; Also, it is preferred to have only one declaration per line.<br>
&gt;<br>
&gt; There are similar issues in the following code.<br>
&gt;<br>
&gt;<br>
&gt; src/ProcessInfo.cpp (Diff revision 2)<br>
&gt;<br>
&gt; private:<br>
&gt;<br>
&gt; 719<br>
&gt;<br>
&gt;                 for (char **p = argv; *p != NULL; p++)<br>
&gt;<br>
&gt; konsole code generally uses the kdelibs style: <br>
&gt;<br>
&gt; for (....) {<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; src/ProcessInfo.cpp (Diff revision 2)<br>
&gt;<br>
&gt; private:<br>
&gt;<br>
&gt; 754<br>
&gt;<br>
&gt;                 envp = readProcArgs(aPid, KERN_PROC_ENV);<br>
&gt;<br>
&gt; This part feels so &quot;C&quot;, which makes it out of place among other \
&quot;C++&quot; code. Also applies to the readProcArgs method above.<br> &gt;<br>
&gt; But that is just my taste. If you feel uncertain about making it more \
&quot;C++&quot; like, just ignore this issue.<br> &gt;<br>
&gt;<br>
&gt; - Jekyll<br>
&gt;<br>
&gt;<br>
&gt; On August 23rd, 2012, 7:29 p.m., Vadim Zhukov wrote:<br>
&gt;<br>
&gt; Review request for Konsole and Jekyll Wu.<br>
&gt; By Vadim Zhukov.<br>
&gt;<br>
&gt; Updated Aug. 23, 2012, 7:29 p.m.<br>
&gt;<br>
&gt; Description<br>
&gt;<br>
&gt; ATM Konsole does not support gathering process information on OpenBSD. I&#39;ve \
a patch adding such support.<br> &gt; The main idea is to extend already existing \
FreeBSDProcessInfo class. I renamed it to a BSDProcessInfo and added a few #ifs here \
and there. If that&#39;s not desirable, I could create separate OpenBSDProcessInfo \
class.<br>

&gt;<br>
&gt; I&#39;ve also fixed a few nits regarding calling C routines (prepended \
&quot;::&quot; to sysctl() and such; added kWarning() printouts if they fail). If \
needed I can do them as a separate diff.<br> &gt;<br>
&gt; Testing<br>
&gt;<br>
&gt; On OpenBSD-CURRENT.<br>
&gt;<br>
&gt; Diffs<br>
&gt; src/ProcessInfo.cpp (32c86b1)<br>
&gt;<br>
&gt; View Diff</p>



_______________________________________________
konsole-devel mailing list
konsole-devel@kde.org
https://mail.kde.org/mailman/listinfo/konsole-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic