Project

General

Profile

Feature #932

LTTng client error code semantics are ill-defined

Added by Jérémie Galarneau over 4 years ago. Updated about 4 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

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

Actions
#1

Updated by Jérémie Galarneau over 4 years ago

  • Related to Bug #847: Enabling system calls returns code 35 instead of 0 added
#2

Updated by Jérémie Galarneau about 4 years ago

  • Target version changed from 2.8 to 2.9

Also available in: Atom PDF