procio(3) — Linux manual page


PROCIO(3)               Linux Programmer's Manual              PROCIO(3)

NAME         top

       fprocopen - stream open functions on files below /proc/##

SYNOPSIS         top

       #define _GNU_SOURCE
       #include <stdio.h>
       #include <proc/procio.h>

       FILE *fprocopen(const char *path, const char *mode);

DESCRIPTION         top

       The fprocopen function opens files below /proc/## whose name is
       the string to by path and associates a stream with it.  The
       argument mode points to a string containing one of the following

       r      Open a file below /proc/## for reading even large buffers.
              The stream is positioned at the beginning of the file.

              Open a file below /proc/## for writing even large buffers.
              The optional delimiter character can be one of the
              follwoing ' ', ',', '.', and ':' where the default is the
              comma ','.  This allows to split very large input lines
              into pieces at this delimiter and write each of them to
              the opened file below /proc/##.

       e      The underlying file descriptor will be closed if you use
              any of the `exec...' functions within your code.

       The internal API allows the use of stdio functions to read and
       write large buffers below /proc/##.

SEE ALSO         top


COPYRIGHT         top

       2018 Werner Fink,

AUTHOR         top

       Werner Fink <>

COLOPHON         top

       This page is part of the procps-ng (/proc filesystem utilities)
       project.  Information about the project can be found at 
       ⟨⟩.  If you have a bug report
       for this manual page, see
       This page was obtained from the project's upstream Git repository
       ⟨⟩ on 2023-06-23.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2023-06-13.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to

Linux Manpage                16 January 2018                   PROCIO(3)