Index: updater.c =================================================================== --- updater.c (revision 186788) +++ updater.c (working copy) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -85,6 +86,8 @@ int deletecount; }; +static struct file_update *curfup = NULL; + static struct file_update *fup_new(struct coll *, struct status *); static int fup_prepare(struct file_update *, char *, int); static void fup_cleanup(struct file_update *); @@ -117,6 +120,7 @@ off_t); static int updater_rsync(struct updater *, struct file_update *, size_t); static int updater_read_checkout(struct stream *, struct stream *); +void updater_infohandler(int); static struct file_update * fup_new(struct coll *coll, struct status *st) @@ -127,6 +131,7 @@ memset(fup, 0, sizeof(*fup)); fup->coll = coll; fup->st = st; + fup->coname = NULL; return (fup); } @@ -233,6 +238,7 @@ up->rd = args->rd; up->errmsg = NULL; up->deletecount = 0; + signal(SIGINFO, updater_infohandler); error = updater_batch(up, 0); @@ -316,8 +322,10 @@ return (UPDATER_ERR_MSG); } fup = fup_new(coll, st); + curfup = fup; error = updater_docoll(up, fup, isfixups); status_close(st, &errmsg); + curfup = NULL; fup_free(fup); if (errmsg != NULL) { /* Discard previous error. */ @@ -2013,3 +2021,10 @@ free(buf); return (error); } + +void +updater_infohandler(int sig __unused) +{ + if (curfup != NULL && curfup->coname != NULL) + printf("updating %s\n", curfup->coname); +}