[Unionfs] copyup being interrupted by a signal?
Shaya Potter
spotter at cs.columbia.edu
Mon Mar 6 19:14:34 EST 2006
so currently copyup basically does a loop over a page size area, reading
it in/writing it out.
but if a signal would be received by the process that causes the copyup,
wouldn't it get interrupted and basically error out?
now, this might not seem like a big deal, as it would just unlink it, so
"no harm, no foul" and the kernel syscall handler should handle it.
however, what happens if one is trying to copyup a large file (say a
large log file) and signals are often, this could be a DOS of sort.
would it be sane to disable signals for the duration of copyup?
something like this
//1. block all signals and remove pending signals if necessary
sigset_t old;
sigset_t new;
new.sig[0] = (unsigned long) (0-1);
sigprocmask(SIG_SETMASK, &new, &old);
//2. do actually copyup
.....
//3. reset signals to old state;
sigprocmask(SIG_SETMASK, &old, NULL);
More information about the unionfs
mailing list