Lines 1-63
Link Here
|
1 |
diff --git a/main.c b/main.c |
|
|
2 |
index 4613c96..3d47f3a 100644 |
3 |
--- a/main.c |
4 |
+++ b/main.c |
5 |
@@ -76,6 +76,7 @@ extern size_t bwlimit_writemax; |
6 |
extern unsigned int module_dirlen; |
7 |
extern BOOL flist_receiving_enabled; |
8 |
extern BOOL shutting_down; |
9 |
+extern BOOL want_progress_now; |
10 |
extern int backup_dir_len; |
11 |
extern int basis_dir_cnt; |
12 |
extern struct stats stats; |
13 |
@@ -1439,6 +1440,15 @@ static void sigusr2_handler(UNUSED(int val)) |
14 |
_exit(0); |
15 |
} |
16 |
|
17 |
+#ifdef SIGINFO |
18 |
+static void siginfo_handler(UNUSED(int val)) |
19 |
+{ |
20 |
+ |
21 |
+ if (!am_server) |
22 |
+ want_progress_now = True; |
23 |
+} |
24 |
+#endif |
25 |
+ |
26 |
void remember_children(UNUSED(int val)) |
27 |
{ |
28 |
#ifdef WNOHANG |
29 |
@@ -1538,6 +1548,9 @@ int main(int argc,char *argv[]) |
30 |
SIGACTMASK(SIGABRT, rsync_panic_handler); |
31 |
SIGACTMASK(SIGBUS, rsync_panic_handler); |
32 |
#endif |
33 |
+#ifdef SIGINFO |
34 |
+ SIGACTMASK(SIGINFO, siginfo_handler); |
35 |
+#endif |
36 |
|
37 |
starttime = time(NULL); |
38 |
our_uid = MY_UID(); |
39 |
diff --git a/receiver.c b/receiver.c |
40 |
index 4ea4c09..1c255ef 100644 |
41 |
--- a/receiver.c |
42 |
+++ b/receiver.c |
43 |
@@ -62,6 +62,8 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; |
44 |
extern struct file_list *cur_flist, *first_flist, *dir_flist; |
45 |
extern filter_rule_list daemon_filter_list; |
46 |
|
47 |
+BOOL want_progress_now; |
48 |
+ |
49 |
static struct bitbag *delayed_bits = NULL; |
50 |
static int phase = 0, redoing = 0; |
51 |
static flist_ndx_list batch_redo_list; |
52 |
@@ -302,6 +304,11 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, |
53 |
while ((i = recv_token(f_in, &data)) != 0) { |
54 |
if (INFO_GTE(PROGRESS, 1)) |
55 |
show_progress(offset, total_size); |
56 |
+ else if (want_progress_now) { |
57 |
+ rprintf(FINFO, "%s\n", fname); |
58 |
+ end_progress(offset); |
59 |
+ } |
60 |
+ want_progress_now = False; |
61 |
|
62 |
if (allowed_lull) |
63 |
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); |