Re: lock(1) timeout message deduplication

2014-03-17 Thread Jean-Philippe Ouellet
Thank you very much for the feedback. On 3/14/14 9:38 AM, Ingo Schwarze wrote: According to the sigaction(3) manual, volatile sig_atomic_t would be better. If i understand correctly, overzealous compilers might otherwise optimize checks away. Dammit, of course. I should have caught that.

Re: lock(1) timeout message deduplication

2014-03-14 Thread Ingo Schwarze
Hi Jean-Philippe, Jean-Philippe Ouellet wrote on Wed, Mar 12, 2014 at 07:11:05PM -0400: On Wed, Mar 12, 2014 at 11:09:14PM +0100, Ingo Schwarze wrote: I don't really like the warnx(3) call from the bye() ALRM handler either, but that's a separate matter. Me neither. Maybe something like

lock(1) timeout message deduplication

2014-03-12 Thread Jean-Philippe Ouellet
Hello, When lock(1) receives SIGINT, SIGQUIT, or SIGTSTP, it calls hi() twice, once because it's the signal handler, and once after readpassphrase() errors because the read was interrupted. Since hi() gets called when readpassphrase() fails anyway, this patch ignores the signals instead of using

Re: lock(1) timeout message deduplication

2014-03-12 Thread Ingo Schwarze
a separate matter. OK to commit? Ingo - Forwarded message from Jean-Philippe Ouellet - From: Jean-Philippe Ouellet jean-phili...@ouellet.biz Date: Wed, 12 Mar 2014 16:08:19 -0400 To: tech@openbsd.org Subject: lock(1) timeout message deduplication Hello, When lock(1) receives SIGINT

Re: lock(1) timeout message deduplication

2014-03-12 Thread Jean-Philippe Ouellet
On Wed, Mar 12, 2014 at 11:09:14PM +0100, Ingo Schwarze wrote: I don't really like the warnx(3) call from the bye() ALRM handler either, but that's a separate matter. Me neither. Maybe something like this instead? (although maybe the done check should be someplace else?) Index: lock.c