[12:37] Keybuk, some stupid suggestions: if it's sent while masked, isn't it just ignored? Do you actually give it a chance to be delivered (eg not looping inside a sighandler)? [12:38] the point of masks is to block their delivery, not cause them to be ignored :) [12:39] I figured what it was; before setting the handler, I set it to SIG_DFL first just to make things sane [12:39] setting a signal to SIG_DFL means it gets handled in the kernel, so the process signal mask doesn't apply [12:39] solution: don't reset the signals when being restarted, and voila [12:39] signals are "reliable" in that they can be raised, and you will get them if you're listening [12:40] however you may just get one, not several, depending on the OS [12:52] I always start to think Unix system programming is hard when I see all the fancy abbrv. [12:54] 96 revision(s) pulled. [12:55] whoa, Keybuk, you seem to work hard [12:55] heh [12:55] there are scarier stats [12:56] bzr diff -r-96.. | diffstat [12:56] it seems most of your work is centred on test suites [12:56] -r 223 was 0.2.7 (edgy version), 179 in libnih [12:57] $ bzr diff -r ..223 | diffstat [12:57] 62 files changed, 19751 insertions(+) [12:57] $ bzr diff -r ..179 | diffstat [12:57] 63 files changed, 17881 insertions(+) [12:57] -- [12:57] vs. [12:58] $ bzr diff -r 223.. | diffstat [12:58] 80 files changed, 21029 insertions(+), 10311 deletions(-) [12:58] $ bzr diff -r 179.. | diffstat [12:58] 66 files changed, 20752 insertions(+), 8230 deletions(-) [12:59] a lot of it is test suite, yeah [12:59] and all the bugs I've found in the process [12:59] getting the code base sane so I can merge in the new stuff [01:00] just a question, does test driven programming worth the effort. It seems to be the norm at Canonical [01:00] effort. -> effort? [01:00] I'm not sure about test-*driven* programming, where you write the tests first, then the code second [01:01] I've found it *very* useful for complex algorithms [01:01] but find it gets in the way of straight forward bone-playing [01:01] I'm certainly a great fan of *tested* programming [01:03] I was thinking writing a test-suite for my small project, a easy-to-use iptables front-end. [01:03] but, I don't think it will be necessary [01:04] the whole is < 1000 lines, without any fancy algorithm [01:10] you should still try and have it tested though [01:10] I've found all manner of silly bugs in the simplest of functions by testing it [01:11] e.g. "initctl shutdown" tried to send message 1 to the pid of the UPSTART_SHUTDOWN enum entry [01:13] hmm, right. In fact, it could be a good learning experience [01:14] after all, I will probably end-up as a software engineer, so I will to learn how to test my code sooner-or-later [01:15] will need* [01:17] hehe, you're a Lord of the Ring fan? [01:17] heh, all the frodo/bilbo references? [01:17] yeah [01:17] they're just common english metasyntactic variables [01:18] foo/bar/baz/frodo/bilbo/drogo/wibble/wobble/etc. [01:18] but yes, also I do like LotR [01:21] also, you got some pretty neat macro in nih/test.h [01:22] originally I didn't have any, and the upstart tests were all just written by hand, even down to printf ("Testing some_function()\n"); [01:22] I grew them into those macros simply to make it easier [01:23] TEST_ALLOC_FAIL is my new favourite; it loops over the enclosed code, counts how many times malloc is called, and then runs the code again causing each one to fail in turn -- so you can test the side-effects of -ENOMEM :p [01:24] yes, I was looking at this one [01:24] TEST_CHILD is neat too [01:27] that reminds me, I have a fix for TEST_CHILD to turn it into one statement :p [01:27] hehe [01:30] I always been a bit scared by C's macros, since I saw #define MAX(A, B) (A > B ? A : B) [01:31] that's a tricky one, because it evaluates both A and B twice [01:31] yep [01:31] so MAX(a++, b++) will expand to (a++ > b++ ? a++ : b++) [01:32] exactly [01:32] the pleasure of side-effects [01:32] so if a was 3 and b was 4, then you'd get 5 as the value, and a would be 4 and b 6 === _ion [i=johan@kiviniemi.name] has joined #upstart [01:32] there's a gccish way of writing that [01:33] but it only works if you know the types [01:33] e.g. [01:33] #define MIN(A,B) ((A) < (B) ? : (A) : (B)) [01:33] #define maxsize_t(a,b) ({size_t _a = (a), _b = (b); _a > _b ? _a : _b; }) [01:33] oh, #define MIN(A,B) (A I've never heard of " I just learned it [01:34] http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Min-and-Max.html [01:35] those are C++ extensions only, no? [01:35] I don't know [01:35] the only note I can find in the gcc 4.1 manual is [01:35] The G++ minimum and maximum operators (`?') and their [01:35] compound forms (`?=') have been deprecated and will be [01:35] removed in a future version. Code using these operators should be [01:35] modified to use `std::min' and `std::max' instead. [01:36] that makes sense [01:36] C++ STL is way more powerful than C's preprocessor [01:37] I don't really like C++ [01:37] if they wanted to make a new language, they should have unbolted it from C [01:37] instead they ended up with a hideous half-breed [01:37] both Java and C# are far more elegant [01:37] well, it depends of your point of view [01:38] the principal thing about C++ that I hate is that it still has header files [01:38] but, I agree that Java and C# are more elegant [01:38] which artificially separates your class structure and code [01:38] AND by inference, exposes your private information to anyone reading them [01:39] they should have dropped the pre-processor, and made cpp files self contained units that could be referenced [01:41] I agree, but I don't think we will ever see a such change in C++ [01:41] indeed [01:41] which is a shame [01:41] the obvious bogosity is "#define private public" [01:47] haha [01:54] oh? [01:54] gcc has improved [01:55] the MAX macro works === j_ack [n=rudi@p508D8897.dip0.t-ipconnect.de] has joined #upstart === kwwz [n=kwwz@202.55.155.85] has joined #upstart === _paulfm [n=paul@c-24-8-141-71.hsd1.co.comcast.net] has joined #upstart [03:27] <_paulfm> hi everyone [03:33] <_paulfm> Is anyone home? :-) [03:35] <_paulfm> I am looking for some upstart help... I have just built it on Debian etch (testing) [03:35] <_paulfm> I am hesitant to do a make install.... Im worried I may hose the init system [03:35] <_paulfm> If I reconfigure and build.. with the /opt/upstart prefix [03:36] <_paulfm> how do I start upstart at boot... so my upstart tests get run... but I leave the "regular" init in place [03:49] <_paulfm> hmmm... nobody home === dns_server [n=dns@ppp246-215.static.internode.on.net] has joined #upstart [04:21] is anyone around that can help me write a script? === wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart === jonib1 [n=jonas@ua-83-227-144-18.cust.bredbandsbolaget.se] has joined #upstart [10:57] moo [10:57] hmm - wrong channel :) [10:58] lol [11:03] cows are welcome here === juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart [12:19] cows make good meat [12:24] they do indeed === baze [n=baze@c170048.adsl.hansenet.de] has joined #upstart === j_ack [n=rudi@p508D8235.dip0.t-ipconnect.de] has joined #upstart === j_ack [n=rudi@p508D8235.dip0.t-ipconnect.de] has joined #upstart [07:53] <_paulfm> hellooo...doe anyone here use upstart on debian === _paulfm [n=paul@c-24-8-141-71.hsd1.co.comcast.net] has joined #upstart === Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart