diff options
author | scottl <scottl@FreeBSD.org> | 2004-02-28 07:50:42 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-02-28 07:50:42 +0000 |
commit | d9a0004b62fe76e69cb6f4ac21d673a03e1b97fe (patch) | |
tree | 54f005956185a8047740cf2432ee3919ed1ebc7c /sbin/fsck_ffs/main.c | |
parent | f9390aef0d6f1aa5e2e8a5caaa474a78f16eda0f (diff) | |
download | FreeBSD-src-d9a0004b62fe76e69cb6f4ac21d673a03e1b97fe.zip FreeBSD-src-d9a0004b62fe76e69cb6f4ac21d673a03e1b97fe.tar.gz |
In the case of a background fsck, periodically update the process title
with a progress update.
Diffstat (limited to 'sbin/fsck_ffs/main.c')
-rw-r--r-- | sbin/fsck_ffs/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 06b4540..1202b53 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -78,6 +78,7 @@ main(int argc, char *argv[]) { int ch; struct rlimit rlimit; + struct itimerval itimerval; int ret = 0; sync(); @@ -150,6 +151,14 @@ main(int argc, char *argv[]) if (preen) (void)signal(SIGQUIT, catchquit); signal(SIGINFO, infohandler); + if (bkgrdflag) { + signal(SIGALRM, alarmhandler); + itimerval.it_interval.tv_sec = 5; + itimerval.it_interval.tv_usec = 0; + itimerval.it_value.tv_sec = 5; + itimerval.it_value.tv_usec = 0; + setitimer(ITIMER_REAL, &itimerval, NULL); + } /* * Push up our allowed memory limit so we can cope * with huge file systems. |