The Samba-Bugzilla – Attachment 828 Details for
Bug 2130
suppressing progress bar when not the foreground process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rsync-progress.patch
rsync-progress.patch (text/plain), 1.59 KB, created by
Luke Mewburn
on 2004-12-08 03:06:40 UTC
(
hide
)
Description:
rsync-progress.patch
Filename:
MIME Type:
Creator:
Luke Mewburn
Created:
2004-12-08 03:06:40 UTC
Size:
1.59 KB
patch
obsolete
>--- configure.in.orig 2004-10-01 02:35:56.000000000 +1000 >+++ configure.in >@@ -447,6 +447,11 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd > strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ > open64 mkstemp64) > >+AC_CHECK_FUNCS(getpgrp) >+if test $ac_cv_func_getpgrp = yes; then >+ AC_FUNC_GETPGRP >+fi >+ > AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[ > AC_TRY_RUN([ > #include <sys/types.h> >--- config.h.in.orig 2004-08-03 07:54:49.000000000 +1000 >+++ config.h.in >@@ -12,6 +12,9 @@ > this is either `int' or `gid_t'. */ > #undef GETGROUPS_T > >+/* Define if the `getpgrp' function takes no argument. */ >+#undef GETPGRP_VOID >+ > /* Define to 1 if you have `alloca', as a function or macro. */ > #undef HAVE_ALLOCA > >@@ -89,6 +92,9 @@ > /* Define to 1 if you have the `getnameinfo' function. */ > #undef HAVE_GETNAMEINFO > >+/* Define if you have the getpgrp function. */ >+#undef HAVE_GETPGRP >+ > /* */ > #undef HAVE_GETTIMEOFDAY_TZ > >--- progress.c.orig 2004-02-28 13:00:57.000000000 +1100 >+++ progress.c >@@ -115,10 +115,19 @@ void end_progress(OFF_T size) > void show_progress(OFF_T ofs, OFF_T size) > { > struct timeval now; >+ static pid_t pgrp = -1; > > if (am_server) > return; > >+ if (pgrp == -1) { >+#if GETPGRP_VOID >+ pgrp = getpgrp(); >+#else /* ! GETPGRP_VOID */ >+ pgrp = getpgrp(0); >+#endif /* ! GETPGRP_VOID */ >+ } >+ > gettimeofday(&now, NULL); > > if (!ph_start.time.tv_sec) { >@@ -150,5 +159,8 @@ void show_progress(OFF_T ofs, OFF_T size > ph_list[newest_hpos].ofs = ofs; > } > >+ if (tcgetpgrp(fileno(stdout)) != pgrp) >+ return; >+ > rprint_progress(ofs, size, &now, False); > }
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 2130
: 828 |
843