The Samba-Bugzilla – Attachment 11508 Details for
Bug 11561
[PATCH] Show progress information when SIGINFO is caught on platforms that have it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Show progress information when SIGINFO is caught
rsync-siginfo.diff (text/plain), 1.68 KB, created by
Dag-Erling Smørgrav
on 2015-10-19 23:30:13 UTC
(
hide
)
Description:
Show progress information when SIGINFO is caught
Filename:
MIME Type:
Creator:
Dag-Erling Smørgrav
Created:
2015-10-19 23:30:13 UTC
Size:
1.68 KB
patch
obsolete
>diff --git a/main.c b/main.c >index 4613c96..0177078 100644 >--- a/main.c >+++ b/main.c >@@ -76,6 +76,7 @@ extern size_t bwlimit_writemax; > extern unsigned int module_dirlen; > extern BOOL flist_receiving_enabled; > extern BOOL shutting_down; >+extern BOOL want_progress_now; > extern int backup_dir_len; > extern int basis_dir_cnt; > extern struct stats stats; >@@ -1439,6 +1440,13 @@ static void sigusr2_handler(UNUSED(int val)) > _exit(0); > } > >+static void siginfo_handler(UNUSED(int val)) >+{ >+ >+ if (!am_server) >+ want_progress_now = True; >+} >+ > void remember_children(UNUSED(int val)) > { > #ifdef WNOHANG >@@ -1538,6 +1546,9 @@ int main(int argc,char *argv[]) > SIGACTMASK(SIGABRT, rsync_panic_handler); > SIGACTMASK(SIGBUS, rsync_panic_handler); > #endif >+#ifdef SIGINFO >+ SIGACTMASK(SIGINFO, siginfo_handler); >+#endif > > starttime = time(NULL); > our_uid = MY_UID(); >diff --git a/receiver.c b/receiver.c >index 4ea4c09..1c255ef 100644 >--- a/receiver.c >+++ b/receiver.c >@@ -62,6 +62,8 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; > extern struct file_list *cur_flist, *first_flist, *dir_flist; > extern filter_rule_list daemon_filter_list; > >+BOOL want_progress_now; >+ > static struct bitbag *delayed_bits = NULL; > static int phase = 0, redoing = 0; > static flist_ndx_list batch_redo_list; >@@ -302,6 +304,11 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, > while ((i = recv_token(f_in, &data)) != 0) { > if (INFO_GTE(PROGRESS, 1)) > show_progress(offset, total_size); >+ else if (want_progress_now) { >+ rprintf(FINFO, "%s\n", fname); >+ end_progress(offset); >+ } >+ want_progress_now = False; > > if (allowed_lull) > maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11561
:
11508
|
11509