Re: Signal handling question
On Sat, Oct 17, 2009 at 8:07 AM, Ingo Schwarze wrote: > Matt Fisher wrote on Thu, Oct 15, 2009 at 11:39:39PM -0400: >> Stuart Henderson referred me to the tech list for this question. >> >> Here's a diff showing one line of possible cruft deleted from m4. >> This is one of 9 similar occurrences I've found in the src tree. > > I guess you are changing semantics. Yes, yes that would. <...> > As far as i understand, that means: > "In case SIGINT is being ignored at the time m4 is invoked, > continue ignoring it. > In case it is not being ignored at startup time, > replace the existing handler by the function onintr." See, Ingo, you're thinking about what the change means. Matt, do you understand *why* that code was originally added to m4? Do you understand the circumstances under which it actually had an effect? Have you investigated whether those circumstances still occur? If the answers to those questions are "yes", then you should say so and back it up. If not, why should we apply a diff to remove code from someone who doesn't know why the code is there? As is, I believe you don't understand why that code was added, don't understand when it was triggered, and don't know whether or not it could still be triggered. >> A few days back I asked the misc list if such code should be *added*. > > As an aside, you didn't say where, or why. > >> Theo replied this isn't necessary in BSD. > > No, Theo wrote: > > "I assume you are talking about resetting the signals when > they are caught. That is not required in BSD unix." > > It is *now* clear this was _not_ what you were talking about, > so Theo's answer doesn't apply. > In fact, you gave no context, so it was not obvious what you > were talking about. Well, IIRC, he cited a usenix paper that described why this code was needed. From Theo's reply I would assume (there's that word again) that he didn't chase the link. I suspect Theo was talking about BSD changing the behavior of signal() to not reset signals on entry to the handler, but that's not what this code is about. The job control semantics (process-groups, etc) that BSD added *are* relevant, but are not the entire picture. >> So I've concluded that >> existing code like this could in fact be deleted. > > At least for the case at hand, i doubt that, but i do not know > that much about signal handling, so i would certainly not dare > to attempt cleanups in that region. I do know signals pretty well and I doubt it as well. >> Is that right? >> Anybody want to see more diffs for deleted cruft? If they lack research like this one, I don't want to see them either. Philip Guenther
Re: how can I get the OpenBSD version during build time?
Henning Brauer wrote: * olli hauer [2009-10-17 15:46]: I'm trying to get the OpenBSD version during build time but I have not find a way how to do this. I know for FreeBSD there is a way like this #ifdef __FreeBSD__ #if __FreeBSD_version < 601000 ... #endif Is there a similar way in OpenBSD? you're looking for the OpenBSD symbol from sys/param.h you wiped the dust from my eyes. thanks, olli
Re: Signal handling question
Hi Matt, Matt Fisher wrote on Thu, Oct 15, 2009 at 11:39:39PM -0400: > Stuart Henderson referred me to the tech list for this question. > > Here's a diff showing one line of possible cruft deleted from m4. > This is one of 9 similar occurrences I've found in the src tree. I guess you are changing semantics. > $ cd /usr/src/usr.bin/m4 > $ diff -u main.c main.c.new > --- main.c Thu Oct 15 21:42:14 2009 > +++ main.c.new Wed Oct 15 23:37:01 2009 > @@ -172,8 +172,7 @@ > int n; > char *p; > > - if (signal(SIGINT, SIG_IGN) != SIG_IGN) > - signal(SIGINT, onintr); As far as i understand, that means: "In case SIGINT is being ignored at the time m4 is invoked, continue ignoring it. In case it is not being ignored at startup time, replace the existing handler by the function onintr." > + signal(SIGINT, onintr); That means: "Always install onintr as the signal handler, even in case SIGINT is currently being ignored." So, if i'm understanding correctly, you are removing the option to ignore SIGINT while running m4. > A few days back I asked the misc list if such code should be *added*. As an aside, you didn't say where, or why. > Theo replied this isn't necessary in BSD. No, Theo wrote: "I assume you are talking about resetting the signals when they are caught. That is not required in BSD unix." It is *now* clear this was _not_ what you were talking about, so Theo's answer doesn't apply. In fact, you gave no context, so it was not obvious what you were talking about. > So I've concluded that > existing code like this could in fact be deleted. At least for the case at hand, i doubt that, but i do not know that much about signal handling, so i would certainly not dare to attempt cleanups in that region. > Is that right? > Anybody want to see more diffs for deleted cruft? Thanks, not me. ;) Yours, Ingo
Re: how can I get the OpenBSD version during build time?
* olli hauer [2009-10-17 15:46]: > I'm trying to get the OpenBSD version during build time but I have > not find a way how to do this. > > I know for FreeBSD there is a way like this > > #ifdef __FreeBSD__ > #if __FreeBSD_version < 601000 > ... > #endif > > > Is there a similar way in OpenBSD? you're looking for the OpenBSD symbol from sys/param.h -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services, http://bsws.de Full-Service ISP - Secure Hosting, Mail and DNS Services Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam
how can I get the OpenBSD version during build time?
Hi, maybe this is the wrong list ... I'm trying to get the OpenBSD version during build time but I have not find a way how to do this. I know for FreeBSD there is a way like this #ifdef __FreeBSD__ #if __FreeBSD_version < 601000 ... #endif Is there a similar way in OpenBSD? Regards, olli
Re: Thank you for making p2k9 possible!
On Fri, Oct 16, 2009 at 10:37:11PM -0400, STeve Andre' wrote: > You can see whats been happening if you are subscribed to the cvs src > changes list. Offhand at least 30 new ports were added, more than 250 > were updated, lots were tweaked, and the pkg_add code was worked on. Most of the tweaks done to pkg_add don't have any user-visible effects... yet. I hope to continue a wee little bit, and then you'll notice fireworks ;-)
Re: Thank you for making p2k9 possible!
On Fri, Oct 16, 2009 at 10:37:11PM -0400, STeve Andre' wrote: | You can see whats been happening if you are subscribed to the cvs src | changes list. Offhand at least 30 new ports were added, more than 250 | were updated, lots were tweaked, and the pkg_add code was worked on. | Likely I missed a lot, too--I was mostly focused on the ports changes | so more stuff was done than I saw. When you want to find out whats | happened (happening) at a hackathon, watching the commits is the | best way to see whats going on. Don't forget about the work done to libtool. The commits there show a lot of work, mostly done by ste...@. Very promising stuff... Paul 'WEiRD' de Weerd -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/