Project

General

Profile

Actions

Feature #932

open

LTTng client error code semantics are ill-defined

Added by Jérémie Galarneau about 9 years ago. Updated over 8 years ago.

Status:
Confirmed
Priority:
Normal
Target version:
Start date:
09/05/2015
Due date:
% Done:

0%

Estimated time:

Description

The LTTNG (1) man page mentions that

On  success 0 is returned and a positive value on error. Value of 1 means a command error, 2 an undefined command, 3 a fatal error and 4 a command warning meaning that something went wrong during the command.

Any other value above 10, please refer to <lttng/lttng-error.h> for a detailed list or use lttng_strerror() to get a human readable string of the error code.

There are a number of things wrong with this. First of all, asking script authors to check some obscure error header deep in the bowels of their system is questionable, at best.

Second, as remarked by Michael Jeanson, Philippe Proulx, most command-line utilities don't return an error code to indicate a warning. A non-zero error code means an error as occurred.

We will have to go through commands and determine which errors are in fact harmless warnings (e.g. enabling the same event twice), and which ones shall signal an error (e.g. invalid channel configuration).


Related issues 1 (0 open1 closed)

Related to LTTng-tools - Bug #847: Enabling system calls returns code 35 instead of 0ResolvedMichael Jeanson10/22/2014

Actions
Actions

Also available in: Atom PDF