Check-in [379773cfa6]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed logging when using fork
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:379773cfa64df46862f18d86f45e6417402cdf85
User & Date: rkeene 2018-04-28 03:10:08
Context
2018-04-28
04:03
More fix ups for logging from threads check-in: ee6bad0d84 user: rkeene tags: trunk
03:10
Fixed logging when using fork check-in: 379773cfa6 user: rkeene tags: trunk
02:54
RivetCGI 0.5.1.8 check-in: 3ccd8ac071 user: rkeene tags: trunk, 0.5.1.8
Changes

Changes to rivet-starkit/main.tcl.

1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
}

proc rivet_cgi_server_request {hostport logfd elogfd pmodel maxthreads httpmode sock addr port {threadId ""}} {
	switch -- $pmodel {
		"fork" {
			# Flush log descriptor, so buffer doesn't contain any extra data.
			if {$logfd != ""} {
				flush $logfd
			}
			if {$elogfd != ""} {
				flush $elogfd
			}

			# Reap up to 10 children per request
			for {set i 0} {$i < 10} {incr i} {
				if {[catch {
					wait -nohang
				}]} {







|


|







1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
}

proc rivet_cgi_server_request {hostport logfd elogfd pmodel maxthreads httpmode sock addr port {threadId ""}} {
	switch -- $pmodel {
		"fork" {
			# Flush log descriptor, so buffer doesn't contain any extra data.
			if {$logfd != ""} {
				flush [::rivetstarkit::logFdToRealFd $logfd]
			}
			if {$elogfd != ""} {
				flush [::rivetstarkit::logFdToRealFd $elogfd]
			}

			# Reap up to 10 children per request
			for {set i 0} {$i < 10} {incr i} {
				if {[catch {
					wait -nohang
				}]} {