Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
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
uplex-varnish
unique-xids
Commits
e8b3d50e
Commit
e8b3d50e
authored
Feb 01, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't wait for a CLI connection if the varnishd process closed the
debug pipe.
parent
c157e5fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+17
-5
No files found.
bin/varnishtest/vtc_varnish.c
View file @
e8b3d50e
...
@@ -237,7 +237,7 @@ varnish_launch(struct varnish *v)
...
@@ -237,7 +237,7 @@ varnish_launch(struct varnish *v)
int
i
,
nfd
,
nap
;
int
i
,
nfd
,
nap
;
struct
vss_addr
**
ap
;
struct
vss_addr
**
ap
;
char
abuf
[
128
],
pbuf
[
128
];
char
abuf
[
128
],
pbuf
[
128
];
struct
pollfd
fd
;
struct
pollfd
fd
[
2
]
;
enum
cli_status_e
u
;
enum
cli_status_e
u
;
char
*
r
;
char
*
r
;
...
@@ -301,13 +301,25 @@ varnish_launch(struct varnish *v)
...
@@ -301,13 +301,25 @@ varnish_launch(struct varnish *v)
AZ
(
pthread_create
(
&
v
->
tp
,
NULL
,
varnish_thread
,
v
));
AZ
(
pthread_create
(
&
v
->
tp
,
NULL
,
varnish_thread
,
v
));
/* Wait for the varnish to call home */
/* Wait for the varnish to call home */
fd
.
fd
=
v
->
cli_fd
;
fd
[
0
].
fd
=
v
->
cli_fd
;
fd
.
events
=
POLLIN
;
fd
[
0
].
events
=
POLLIN
;
i
=
poll
(
&
fd
,
1
,
10000
);
fd
[
1
].
fd
=
v
->
fds
[
0
];
if
(
i
!=
1
)
{
fd
[
1
].
events
=
POLLOUT
;
i
=
poll
(
fd
,
2
,
10000
);
vtc_log
(
v
->
vl
,
4
,
"CLIPOLL %d 0x%x 0x%x"
,
i
,
fd
[
0
].
revents
,
fd
[
1
].
revents
);
if
(
i
==
0
)
{
vtc_log
(
v
->
vl
,
0
,
"FAIL timeout waiting for CLI connection"
);
vtc_log
(
v
->
vl
,
0
,
"FAIL timeout waiting for CLI connection"
);
return
;
return
;
}
}
if
(
fd
[
1
].
revents
&
POLLHUP
)
{
vtc_log
(
v
->
vl
,
0
,
"FAIL debug pipe closed"
);
return
;
}
if
(
!
(
fd
[
0
].
revents
&
POLLIN
))
{
vtc_log
(
v
->
vl
,
0
,
"FAIL CLI connection wait failure"
);
return
;
}
nfd
=
accept
(
v
->
cli_fd
,
NULL
,
NULL
);
nfd
=
accept
(
v
->
cli_fd
,
NULL
,
NULL
);
if
(
nfd
<
0
)
{
if
(
nfd
<
0
)
{
vtc_log
(
v
->
vl
,
0
,
"FAIL no CLI connection accepted"
);
vtc_log
(
v
->
vl
,
0
,
"FAIL no CLI connection accepted"
);
...
...
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