Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
66984b98
Commit
66984b98
authored
May 27, 2004
by
justdave%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 183753: Fix error "can't fork duplicates.cgi: Bad file descriptor" in collectstats.pl on Win32
Patch by Byron Jones <bugzilla@glob.com.au> r=jouni, myk; a=myk
parent
3a5de3cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
collectstats.pl
collectstats.pl
+21
-11
No files found.
collectstats.pl
View file @
66984b98
...
...
@@ -84,18 +84,27 @@ my $tend = time;
CollectSeriesData
();
# Generate a static RDF file containing the default view of the duplicates data.
open
(
CGI
,
"GATEWAY_INTERFACE=cmdline REQUEST_METHOD=GET QUERY_STRING=ctype=rdf ./duplicates.cgi |"
)
||
die
"can't fork duplicates.cgi: $!"
;
open
(
RDF
,
">$datadir/duplicates.tmp"
)
||
die
"can't write to $datadir/duplicates.tmp: $!"
;
my
$headers_done
=
0
;
while
(
<
CGI
>
)
{
print
RDF
if
$headers_done
;
$headers_done
=
1
if
$_
eq
"\n"
;
{
local
$ENV
{
'GATEWAY_INTERFACE'
}
=
'cmdline'
;
local
$ENV
{
'REQUEST_METHOD'
}
=
'GET'
;
local
$ENV
{
'QUERY_STRING'
}
=
'ctype=rdf'
;
my
$perl
=
$^X
;
trick_taint
(
$perl
);
# Generate a static RDF file containing the default view of the duplicates data.
open
(
CGI
,
"$perl -T duplicates.cgi |"
)
||
die
"can't fork duplicates.cgi: $!"
;
open
(
RDF
,
">$datadir/duplicates.tmp"
)
||
die
"can't write to $datadir/duplicates.tmp: $!"
;
my
$headers_done
=
0
;
while
(
<
CGI
>
)
{
print
RDF
if
$headers_done
;
$headers_done
=
1
if
$_
eq
"\n"
;
}
close
CGI
;
close
RDF
;
}
close
CGI
;
close
RDF
;
if
(
-
s
"$datadir/duplicates.tmp"
)
{
rename
(
"$datadir/duplicates.rdf"
,
"$datadir/duplicates-old.rdf"
);
rename
(
"$datadir/duplicates.tmp"
,
"$datadir/duplicates.rdf"
);
...
...
@@ -183,6 +192,7 @@ sub calculate_dupes {
# so we can read it back in to do changed counters
# First, delete it if it exists, so we don't add to the contents of an old file
if
(
my
@files
=
<
$datadir
/duplicates/
dupes$today
*>
)
{
map
{
trick_taint
(
$_
)
}
@files
;
unlink
@files
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment