ksgi

Форк
0
/
khttp_free.3 
83 строки · 2.1 Кб
1
.\"	$Id$
2
.\"
3
.\" Copyright (c) 2014 Kristaps Dzonsons <kristaps@bsd.lv>
4
.\"
5
.\" Permission to use, copy, modify, and distribute this software for any
6
.\" purpose with or without fee is hereby granted, provided that the above
7
.\" copyright notice and this permission notice appear in all copies.
8
.\"
9
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
.\"
17
.Dd $Mdocdate$
18
.Dt KHTTP_FREE 3
19
.Os
20
.Sh NAME
21
.Nm khttp_free ,
22
.Nm khttp_child_free
23
.Nd free a CGI instance for kcgi
24
.Sh LIBRARY
25
.Lb libkcgi
26
.Sh SYNOPSIS
27
.In sys/types.h
28
.In stdarg.h
29
.In stdint.h
30
.In kcgi.h
31
.Ft void
32
.Fo khttp_free
33
.Fa "struct kreq *req"
34
.Fc
35
.Ft void
36
.Fo khttp_child_free
37
.Fa "struct kreq *req"
38
.Fc
39
.Sh DESCRIPTION
40
The
41
.Fn khttp_free
42
and
43
.Fn khttp_child_free
44
functions free the resources of
45
.Fa req
46
allocated by
47
.Xr khttp_parse 3
48
or
49
.Xr khttp_fcgi_parse 3 ,
50
flushing the HTTP data stream in the process.
51
After calling this function, the members of
52
.Fa req
53
should not be used and the function should not be called again.
54
.Pp
55
The
56
.Fn khttp_child_free
57
function performs the same operations as
58
.Fn khttp_free ,
59
but does not flush the HTTP data stream.
60
Thus, it may be used after invoking
61
.Xr fork 2
62
without confusing the output buffer.
63
.Pp
64
.Em Note :
65
if you're forking within your CGI application, be aware of some caveats.
66
Most web servers will continue to wait while
67
.Dv stdout ,
68
.Dv stderr ,
69
and
70
.Dv stdin
71
are open to the CGI application.
72
Thus, if you fork a long-running application, you must close out these
73
file descriptors.
74
.Sh SEE ALSO
75
.Xr kcgi 3 ,
76
.Xr khttp_parse 3
77
.Sh AUTHORS
78
The
79
.Fn khttp_free
80
and
81
.Fn khttp_child_free
82
functions were written by
83
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
84

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.