- return 0 for a config function is considered 'exit' by interpreter
- if size of the queue is 0, the function return -1
- for other error cases, the return code was decremented by 1
(cherry picked from commit bde57b53386e792651b5ac86ea32d16ab721a07c)