---
name: "FCGI_StartFilterData"
section: "3"
platform: "linux"
package: "fcgi"
version: "2.4.7-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/FCGI_StartFilterData"
---

# FCGI\_StartFilterData(3)

NAME\
      FCGI\_StartFilterData - fcgi\_stdio compatibility library

SYNOPSIS\
      \#include "fcgi\_stdio.h"

     int\
      FCGI\_StartFilterData(void);

DESCRIPTION\
      Enables a FastCGI Filter application to begin reading its filter\
      input data from stdin.

     In order to call FCGI\_StartFilterData, the FastCGI\
      application should have been invoked in the Filter role\
      (getenv("FCGI\_ROLE") == "FILTER"), and should have read\
      stdin to EOF, consuming the entire FCGI\_STDIN data stream.\
      The call to FCGI\_StartFilterData positions stdin at the\
      start of FCGI\_DATA.

     If the preconditions are not met (e.g. the application has\
      not read stdin to EOF), FCGI\_StartFilterData returns\
      a negative result, and the application will get EOF on attempts\
      to read from stdin.

     The application can determine the number of bytes available\
      on FCGI\_DATA by performing atoi(getenv("FCGI\_DATA\_LENGTH")).\
      If fewer than this many bytes are delievered on stdin after\
      calling FCGI\_StartFilterData, the application should perform\
      an application-specific error response.  If the application\
      normally makes an update, most likely it should abort the update.

     The application can determine last modification time of the\
      filter input data by performing getenv("FCGI\_DATA\_LAST\_MOD").\
      This allows applications to perform caching based on last\
      modification time.

RETURN VALUES\
      0 for successful call, \< 0 for error.

SEE ALSO\
      [FCGI\_Accept(3)](/FCGI_Accept/3.md)\
      [FCGI\_SetExitStatus(3)](/FCGI_SetExitStatus/3.md)\
      [cgi-fcgi(1)](/cgi-fcgi/1.md)

HISTORY\
      Copyright (c) 1996 Open Market, Inc.\
      See the file "LICENSE" for information on usage and redistribution\
      of this file, and for a DISCLAIMER OF ALL WARRANTIES.\
      $Id: FCGI\_StartFilterData.3,v 1.1.1.1 1997/09/16 15:36:26 stanleyg Exp $
