Mark Burgess wrote:
> Please look again at svn. The message seems incorrect or needs
> clarification. The changes that were made to popen.c would be the only
> possible way to avoid the problem you mention as far as I can see.
I think there is some confusion. The diff I showed was 2.2.1 verses
trunk. That statement is the only relevant changed code.
> Can you demonstrate the the earlier code did *not* have the behaviour
> you suggest?
Demonstrate how? Let me put it this way -- all of our production
systems are using 2.2.1 without any problems. And removing that block
also allows the trunk code to function without any problems.
> Jo Rhett wrote:
>> That is svn as of this afternoon. The only statement I added was the
>> Verbose line to confirm that it was exiting here.
>>
>> Anyway, it seems that
>> >> +if ((pid = CHILD[fd]) == 0)
>>
>> is always returning true with FreeBSD no matter what command is run. I
>> tried running /bin/true and got the same result.
>>
>> Mark Burgess wrote:
>>> I don't understand what you are saying here. In the position of +++
>>> lines suggested by the email, this code has to always return -1, but
>>> this was altered by Eric s that this was not the case. This is not
>>> what the svn code looks like today.
>>>
>>> Can you clarify?
>>>
>>> M
>>>
>>> Jo Rhett wrote:
>>>> I've traced part of the problem -- cfpclose is now returning -1 to all
>>>> external commands, instead of their actual exit status. The problem
>>>> appears to be from this change (I tested with the verbose statement I
>>>> added)
>>>>
>>>> --- /usr/ports/sysutils/cfengine/work/cfengine-2.2.1/src/popen.c
>>>> Fri Jan 13 12:39:00 2006
>>>> +++ popen.c Sat Jul 28 13:51:19 2007
>>>>
>>>> CHILD[fd] = 0;
>>>>
>>>> +if ((pid = CHILD[fd]) == 0)
>>>> + {
>>>> + Verbose("pid = CHILD[fd] returned 0.\n");
>>>> + return -1;
>>>> + }
>>>> +
>>>> if (fclose(pp) == EOF)
>>>> {
>>>> return -1;
>>>>
>>>> This is always failing on FreeBSD, and thus breaking the queries for
>>>> packages.
>>>>
>>
>
--
Jo Rhett
senior geek
Silicon Valley Colocation
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine