Blame support/descriptors.h

Packit Service 0068d0
/* Monitoring file descriptor usage.
Packit Service 0068d0
   Copyright (C) 2018 Free Software Foundation, Inc.
Packit Service 0068d0
   This file is part of the GNU C Library.
Packit Service 0068d0
Packit Service 0068d0
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 0068d0
   modify it under the terms of the GNU Lesser General Public
Packit Service 0068d0
   License as published by the Free Software Foundation; either
Packit Service 0068d0
   version 2.1 of the License, or (at your option) any later version.
Packit Service 0068d0
Packit Service 0068d0
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 0068d0
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 0068d0
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 0068d0
   Lesser General Public License for more details.
Packit Service 0068d0
Packit Service 0068d0
   You should have received a copy of the GNU Lesser General Public
Packit Service 0068d0
   License along with the GNU C Library; if not, see
Packit Service 0068d0
   <http://www.gnu.org/licenses/>.  */
Packit Service 0068d0
Packit Service 0068d0
#ifndef SUPPORT_DESCRIPTORS_H
Packit Service 0068d0
#define SUPPORT_DESCRIPTORS_H
Packit Service 0068d0
Packit Service 0068d0
#include <stdio.h>
Packit Service 0068d0
Packit Service 0068d0
/* Opaque pointer, for capturing file descriptor lists.  */
Packit Service 0068d0
struct support_descriptors;
Packit Service 0068d0
Packit Service 0068d0
/* Record the currently open file descriptors and store them in the
Packit Service 0068d0
   returned list.  Terminate the process if the listing operation
Packit Service 0068d0
   fails.  */
Packit Service 0068d0
struct support_descriptors *support_descriptors_list (void);
Packit Service 0068d0
Packit Service 0068d0
/* Deallocate the list of descriptors.  */
Packit Service 0068d0
void support_descriptors_free (struct support_descriptors *);
Packit Service 0068d0
Packit Service 0068d0
/* Write the list of descriptors to STREAM, adding PREFIX to each
Packit Service 0068d0
   line.  */
Packit Service 0068d0
void support_descriptors_dump (struct support_descriptors *,
Packit Service 0068d0
                               const char *prefix, FILE *stream);
Packit Service 0068d0
Packit Service 0068d0
/* Check for file descriptor leaks and other file descriptor changes:
Packit Service 0068d0
   Compare the current list of descriptors with the passed list.
Packit Service 0068d0
   Record a test failure if there are additional open descriptors,
Packit Service 0068d0
   descriptors have been closed, or if a change in file descriptor can
Packit Service 0068d0
   be detected.  */
Packit Service 0068d0
void support_descriptors_check (struct support_descriptors *);
Packit Service 0068d0
Packit Service 0068d0
#endif /* SUPPORT_DESCRIPTORS_H */