.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" From: @(#)err.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD: src/lib/libc/gen/err.3,v 1.11.2.5 2001/08/17 15:42:32 ru Exp $ .\" .\" 2011-09-10, mtk, Converted from mdoc to man macros .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH ERR 3 "9 juin 2020" Linux "Manuel du programmeur Linux" .SH NOM err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- Messages d'erreurs formatés .SH SYNOPSIS .nf \fB#include \fP .PP \fBvoid err(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid errx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid warn(const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid warnx(const char *\fP\fIfmt\fP\fB, ...);\fP \fB#include \fP .PP \fBvoid verr(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid verrx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid vwarn(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .PP \fBvoid vwarnx(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .fi .SH DESCRIPTION Les fonctions de la famille \fBerr\fP() et \fBwarn\fP() affichent un message d'erreur formaté sur la sortie d'erreur standard. Dans tous les cas, elles affichent le nom du programme, un deux\-points et une espace. Si l'argument \fIfmt\fP n'est pas NULL, le message est affiché avec un format de type \fBprintf\fP(3). La sortie se termine par un saut de ligne. .PP Les fonctions \fBerr\fP(), \fBverr\fP(), \fBwarn\fP() et \fBvwarn\fP() ajoutent un message d'erreur obtenu avec \fBstrerror\fP(3) à partir de la variable globale \fIerrno\fP, précédé d'un autre deux\-points et d'une espace, sauf si l'argument \fIfmt\fP est NULL. .PP Les fonctions \fBerrx\fP() et \fBwarnx\fP() n'ajoutent pas de message d'erreur. .PP Les fonctions \fBerr\fP(), \fBverr\fP(), \fBerrx\fP(), et \fBverrx\fP() ne renvoient pas, elles terminent le programme avec le code de retour \fIeval\fP. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lbw17 lb lb l l l. Interface Attribut Valeur T{ \fBerr\fP(), \fBerrx\fP(), .br \fBwarn\fP(), \fBwarnx\fP(), .br \fBverr\fP(), \fBverrx\fP(), .br \fBvwarn\fP(), \fBvwarnx\fP() T} Sécurité des threads MT\-Safe locale .TE .sp 1 .SH CONFORMITÉ .\" .SH HISTORY .\" The .\" .BR err () .\" and .\" .BR warn () .\" functions first appeared in .\" 4.4BSD. Ces fonctions sont des extensions BSD non standard. .SH EXEMPLES Afficher la chaîne d'informations \fIerrno\fP courante et sortir\ : .PP .in +4n .EX p = malloc(size); if (p == NULL) err(EXIT_FAILURE, NULL); fd = open(file_name, O_RDONLY, 0); if (fd == \-1) err(EXIT_FAILURE, "%s", file_name); .EE .in .PP Afficher un message d'erreur et sortir\ : .PP .in +4n .EX if (tm.tm_hour < START_TIME) errx(EXIT_FAILURE, "trop tôt, attendre jusqu'à %s", start_time_string); .EE .in .PP Avertissement sur une erreur\ : .PP .in +4n .EX fd = open(raw_device, O_RDONLY, 0); if (fd == \-1) warnx("%s\ : %s\ : essai du système bloc", raw_device, strerror(errno)); fd = open(block_device, O_RDONLY, 0); if (fd == \-1) err(EXIT_FAILURE, "%s", block_device); .EE .in .SH "VOIR AUSSI" \fBerror\fP(3), \fBexit\fP(3), \fBperror\fP(3), \fBprintf\fP(3), \fBstrerror\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .