tmpfile(3) | Library Functions Manual | tmpfile(3) |
NOMBRE
tmpfile - crea un fichero temporal
BIBLIOTECA
Biblioteca Estándar C (libc, -lc)
SINOPSIS
#include <stdio.h>
FILE *tmpfile(void);
DESCRIPCIÓN
The tmpfile() function opens a unique temporary file in binary read/write (w+b) mode. The file will be automatically deleted when it is closed or the program terminates.
VALOR DEVUELTO
La función tmpfile() devuelve un descriptor de flujo, o bien NULL si no se puede generar un nombre único de fichero o el fichero único no se puede abrir. En el último caso, se modifica errno para indicar el error.
ERRORES
- EACCES
- Permiso de búsqueda denegado para el directorio correspondiente al prefijo de trayectoria del fichero.
- EEXIST
- Imposible generar un nombre único de fichero.
- EINTR
- La llamada fue interrumpida por una señal; vea signal(7).
- EMFILE
- The per-process limit on the number of open file descriptors has been reached.
- ENFILE
- The system-wide limit on the total number of open files has been reached.
- ENOSPC
- No hay espacio en el directorio para añadir el nuevo nombre de fichero.
- EROFS
- Sistema de ficheros de sólo lectura.
ATRIBUTOS
Para obtener una explicación de los términos usados en esta sección, véase attributes(7).
Interfaz | Atributo | Valor |
tmpfile() | Seguridad del hilo | Multi-hilo seguro |
ESTÁNDARES
POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD, SUSv2.
NOTAS
POSIX.1-2001 specifies: an error message may be written to stdout if the stream cannot be opened.
The standard does not specify the directory that tmpfile() will use. glibc will try the path prefix P_tmpdir defined in <stdio.h>, and if that fails, then the directory /tmp.
VÉASE TAMBIÉN
TRADUCCIÓN
La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars <mpi79470@alu.um.es>
Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.
Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.
5 Febrero 2023 | Páginas de manual de Linux 6.03 |