Paul Eggert wrote: > > But in a multi-threaded process, a SIGINT that comes in between steps 2 > > and 3 > > is delivered through another thread and terminates the process, without > > having deleted the temporary file. > > Would it be less invasive to put a spin lock (in addition to blocking > the signal) around the critical section? That would avoid the need for > sigaction fiddling with global process state, something that looks like > it might cause trouble.
Hm? I don't understand. The goal being to avoid that a SIGINT signal being handled by a thread other than the current thread, how can a spin lock help doing that? If you mean to install a certain SIGINT handler, how do you imagine that handler to look like? Bruno
