Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
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
liblongpath
liblongpath-rsync
Commits
1e9ee19a
Commit
1e9ee19a
authored
May 28, 2013
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look for got_kill_signal in a couple more spots.
parent
9bf06586
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
io.c
io.c
+16
-6
No files found.
io.c
View file @
1e9ee19a
...
@@ -514,6 +514,13 @@ void restore_iobuf_size(xbuf *out)
...
@@ -514,6 +514,13 @@ void restore_iobuf_size(xbuf *out)
}
}
}
}
static
void
handle_kill_signal
(
BOOL
flush_ok
)
{
got_kill_signal
=
-
1
;
flush_ok_after_signal
=
flush_ok
;
exit_cleanup
(
RERR_SIGNAL
);
}
/* Perform buffered input and/or output until specified conditions are met.
/* Perform buffered input and/or output until specified conditions are met.
* When given a "needed" read or write request, this returns without doing any
* When given a "needed" read or write request, this returns without doing any
* I/O if the needed input bytes or write space is already available. Once I/O
* I/O if the needed input bytes or write space is already available. Once I/O
...
@@ -735,6 +742,9 @@ static char *perform_io(size_t needed, int flags)
...
@@ -735,6 +742,9 @@ static char *perform_io(size_t needed, int flags)
break
;
break
;
}
}
if
(
got_kill_signal
>
0
)
handle_kill_signal
(
True
);
if
(
extra_flist_sending_enabled
)
{
if
(
extra_flist_sending_enabled
)
{
if
(
file_total
-
file_old_total
<
MAX_FILECNT_LOOKAHEAD
&&
IN_MULTIPLEXED_AND_READY
)
if
(
file_total
-
file_old_total
<
MAX_FILECNT_LOOKAHEAD
&&
IN_MULTIPLEXED_AND_READY
)
tv
.
tv_sec
=
0
;
tv
.
tv_sec
=
0
;
...
@@ -854,11 +864,8 @@ static char *perform_io(size_t needed, int flags)
...
@@ -854,11 +864,8 @@ static char *perform_io(size_t needed, int flags)
}
}
}
}
if
(
got_kill_signal
>
0
)
{
if
(
got_kill_signal
>
0
)
got_kill_signal
=
-
1
;
handle_kill_signal
(
True
);
flush_ok_after_signal
=
True
;
exit_cleanup
(
RERR_SIGNAL
);
}
/* We need to help prevent deadlock by doing what reading
/* We need to help prevent deadlock by doing what reading
* we can whenever we are here trying to write. */
* we can whenever we are here trying to write. */
...
@@ -879,6 +886,9 @@ static char *perform_io(size_t needed, int flags)
...
@@ -879,6 +886,9 @@ static char *perform_io(size_t needed, int flags)
}
}
double_break:
double_break:
if
(
got_kill_signal
>
0
)
handle_kill_signal
(
True
);
data
=
iobuf
.
in
.
buf
+
iobuf
.
in
.
pos
;
data
=
iobuf
.
in
.
buf
+
iobuf
.
in
.
pos
;
if
(
flags
&
PIO_CONSUME_INPUT
)
{
if
(
flags
&
PIO_CONSUME_INPUT
)
{
...
@@ -2339,7 +2349,7 @@ int io_end_multiplex_out(int mode)
...
@@ -2339,7 +2349,7 @@ int io_end_multiplex_out(int mode)
iobuf
.
out
.
len
=
0
;
iobuf
.
out
.
len
=
0
;
iobuf
.
out_empty_len
=
0
;
iobuf
.
out_empty_len
=
0
;
if
(
got_kill_signal
>
0
)
/* Just in case... */
if
(
got_kill_signal
>
0
)
/* Just in case... */
exit_cleanup
(
RERR_SIGNAL
);
handle_kill_signal
(
False
);
got_kill_signal
=
-
1
;
got_kill_signal
=
-
1
;
return
ret
;
return
ret
;
...
...
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