Conversation

This PR is more cleanup. It converts the remaining broker C modules that use json-c to jansson.

@grondo it may be good for you to have a quick look over the exec.c commit proposed here. It's passing tests on my c9 image, but I did need to change it more than I wanted to make the error paths more clear (to me) as I worked through it. If this causes grief in your imp test branch, we can always skip this commit here and try again later.

This comment has been minimized.

It is difficult to review the broker/exec commit because it is a conversion to jansson and a rewrite of the code. Ideally it would be split into an update to jansson, then the rewrite/refactor, (which seems to be good afaict), as this would be easier to review and follow in history. However, In this case since the work is already done and tests are passing I'd say go ahead and keep the changes. (But perhaps rename the commit message to "broker/exec: rewrite and update to jansson" with an actual commit body that mentions the code was refactored for better error handling and code clarity. (Could some of the other commits use bodies as well?)

This comment has been minimized.

Looking at the code coverage changes, I don't think there is a problem here per se, but the update to jansson does seem to add a lot more unchecked error conditions, which seems to account for majority of the misses I'm seeing.

In preparation for jansson conversion and more error
handling for JSON-related failures, split the response
payload creation out of child_io_cb() into
prepare_io_payload().
child_io_cb() was renamed from subprocess_io_cb to avoid
namespace confusion with the subprocess class.

In preparation for jansson conversion and more error
handling for JSON-related failures, split the zio-decode
and subprocess write calls from write_request_cb().
Alter request payload parsing logic slightly to make
it easier to drop-in requestf.

Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.