.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" SPDX-License-Identifier: BSD-4-Clause-UC .\" .\" 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 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- mensajes de error con formato .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fB[[noreturn]] void err(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP \fB[[noreturn]] void errx(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fBvoid warn(const char *\fP\fIfmt\fP\fB, ...);\fP \fBvoid warnx(const char *\fP\fIfmt\fP\fB, ...);\fP .PP \fB#include \fP .PP \fB[[noreturn]] void verr(int \fP\fIeval\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP \fB[[noreturn]] void 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 \fBvoid vwarnx(const char *\fP\fIfmt\fP\fB, va_list \fP\fIargs\fP\fB);\fP .fi .SH DESCRIPCIÓN La familia de funciones \fBerr\fP() y \fBwarn\fP() muestran un mensaje de error con formato en la salida estándar de error. En todos los casos, se imprime el último componente del nombre del programa, un carácter punto y un espacio. Si el argumento \fIfmt\fP es distinto de NULL, se imprime un mensaje de error con formato al estilo de \fBprintf\fP(3). La salida finaliza con un carácter nueva línea. .PP The \fBerr\fP(), \fBverr\fP(), \fBwarn\fP(), and \fBvwarn\fP() functions append an error message obtained from \fBstrerror\fP(3) based on the global variable \fIerrno\fP, preceded by another colon and space unless the \fIfmt\fP argument is NULL. .PP Las funciones \fBerrx\fP() y \fBwarnx\fP() no añaden ningún mensaje de error. .PP Las funciones \fBerr\fP(), \fBverr\fP(), \fBerrx\fP() y \fBverrx\fP() no regresan, sino que terminan la ejecución con el valor del argumento \fIeval\fP. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBerr\fP(), \fBerrx\fP(), \fBwarn\fP(), \fBwarnx\fP(), \fBverr\fP(), \fBverrx\fP(), \fBvwarn\fP(), \fBvwarnx\fP() T} Seguridad del hilo Configuración regional de multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES BSD. .SH HISTORIAL .TP \fBerr\fP() .TQ \fBwarn\fP() 4.4BSD. .SH EJEMPLOS Muestra la cadena de información del \fIerrno\fP actual y termina: .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 Muestra un mensaje de error y termina: .PP .in +4n .EX if (tm.tm_hour < START_TIME) errx(EXIT_FAILURE, "too early, wait until %s", start_time_string); .EE .in .PP Aviso de un error: .PP .in +4n .EX fd = open(raw_device, O_RDONLY, 0); if (fd == \-1) warnx("%s: %s: trying the block device", raw_device, strerror(errno)); fd = open(block_device, O_RDONLY, 0); if (fd == \-1) err(EXIT_FAILURE, "%s", block_device); .EE .in .SH "VÉASE TAMBIÉN" \fBerror\fP(3), \fBexit\fP(3), \fBperror\fP(3), \fBprintf\fP(3), \fBstrerror\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .