GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KHTTP_FREE(3) FreeBSD Library Functions Manual KHTTP_FREE(3)

khttp_free, khttp_child_free
free a CGI instance for kcgi

library “libkcgi”

#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>

void
khttp_free(struct kreq *req);

void
khttp_child_free(struct kreq *req);

The khttp_free() and khttp_child_free() functions free the resources of req allocated by khttp_parse(3) or khttp_fcgi_parse(3), flushing the HTTP data stream in the process. After calling this function, the members of req should not be used and the function should not be called again.

The khttp_child_free() function performs the same operations as khttp_free(), but does not flush the HTTP data stream. Thus, it may be used after invoking fork(2) without confusing the output buffer.

Note: if you're forking within your CGI application, be aware of some caveats. Most web servers will continue to wait while stdout, stderr, and stdin are open to the CGI application. Thus, if you fork a long-running application, you must close out these file descriptors.

kcgi(3), khttp_parse(3)

The khttp_free() and khttp_child_free() functions were written by Kristaps Dzonsons <kristaps@bsd.lv>.
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.