[PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

Ján Tomko jtomko at redhat.com
Fri Jan 7 12:09:11 UTC 2022


On a Friday in 2022, Ani Sinha wrote:
>
>
>On Fri, 7 Jan 2022, Ján Tomko wrote:
>
>> On a Friday in 2022, Ani Sinha wrote:
>> > On Fri, 7 Jan 2022, Michal Prívozník wrote:
>> > > I don't think so. Just like we've discussed under one patch of yours, a
>> > > function should either report error in all cases or none. And in case of
>> > > virProcessGetSchedInfo() the linux version does report error
>> >
>> > I see your point but there is also a bug in that function - not all error
>> > paths report errors. For example, !proc and !lines cases. We need to fix
>> > that.
>> >
>>
>> I don't see a !proc error path in virProcessGetSchedInfo.
>>
>
>   if (tid)
>        proc = g_strdup_printf("/proc/%d/task/%d/sched", (int) pid, (int)
>tid);
>    else
>        proc = g_strdup_printf("/proc/%d/sched", (int) pid);
>    if (!proc)
>        return -1; <=== not reported
>

Oh, I did not realize that I had Michal's patch that removes it applied locally:
https://listman.redhat.com/archives/libvir-list/2022-January/msg00270.html

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220107/5a3a30e3/attachment-0001.sig>


More information about the libvir-list mailing list