SeveasKeybuk, 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:37
Keybukthe point of masks is to block their delivery, not cause them to be ignored :)12:38
KeybukI figured what it was; before setting the handler, I set it to SIG_DFL first just to make things sane12:39
Keybuksetting a signal to SIG_DFL means it gets handled in the kernel, so the process signal mask doesn't apply12:39
Keybuksolution: don't reset the signals when being restarted, and voila12:39
Keybuksignals are "reliable" in that they can be raised, and you will get them if you're listening12:39
Keybukhowever you may just get one, not several, depending on the OS12:40
theCoreI always start to think Unix system programming is hard when I see all the fancy abbrv.12:52
theCore96 revision(s) pulled.12:54
theCorewhoa, Keybuk, you seem to work hard12:55
Keybukthere are scarier stats12:55
theCorebzr diff -r-96.. | diffstat12:56
theCoreit seems most of your work is centred on test suites12:56
Keybuk-r 223 was 0.2.7 (edgy version), 179 in libnih12:56
Keybuk$ bzr diff -r ..223 | diffstat12:57
Keybuk 62 files changed, 19751 insertions(+)12:57
Keybuk$  bzr diff -r ..179 | diffstat12:57
Keybuk 63 files changed, 17881 insertions(+)12:57
Keybuk-- 12:57
Keybuk$ bzr diff -r 223.. | diffstat12:58
Keybuk 80 files changed, 21029 insertions(+), 10311 deletions(-)12:58
Keybuk$  bzr diff -r 179.. | diffstat12:58
Keybuk 66 files changed, 20752 insertions(+), 8230 deletions(-)12:58
Keybuka lot of it is test suite, yeah12:59
Keybukand all the bugs I've found in the process12:59
Keybukgetting the code base sane so I can merge in the new stuff12:59
theCorejust a question, does test driven programming worth the effort. It seems to be the norm at Canonical 01:00
theCoreeffort. -> effort?01:00
KeybukI'm not sure about test-*driven* programming, where you write the tests first, then the code second01:00
KeybukI've found it *very* useful for complex algorithms01:01
Keybukbut find it gets in the way of straight forward bone-playing01:01
KeybukI'm certainly a great fan of *tested* programming01:01
theCoreI was thinking writing a test-suite for my small project, a easy-to-use iptables front-end. 01:03
theCorebut, I don't think it will be necessary01:03
theCorethe whole is < 1000 lines, without any fancy algorithm01:04
Keybukyou should still try and have it tested though01:10
KeybukI've found all manner of silly bugs in the simplest of functions by testing it01:10
Keybuke.g. "initctl shutdown" tried to send message 1 to the pid of the UPSTART_SHUTDOWN enum entry01:11
theCorehmm, right. In fact, it could be a good learning experience01:13
theCoreafter all, I will probably end-up as a software engineer, so I will to learn how to test my code sooner-or-later01:14
theCorewill need*01:15
theCorehehe, you're a Lord of the Ring fan?01:17
Keybukheh, all the frodo/bilbo references?01:17
Keybukthey're just common english metasyntactic variables01:17
Keybukbut yes, also I do like LotR01:18
theCorealso, you got some pretty neat macro in nih/test.h01:21
Keybukoriginally 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
KeybukI grew them into those macros simply to make it easier01:22
KeybukTEST_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 :p01:23
theCoreyes, I was looking at this one01:24
theCoreTEST_CHILD is neat too01:24
Keybukthat reminds me, I have a fix for TEST_CHILD to turn it into one statement :p01:27
theCoreI always been a bit scared by C's macros, since I saw #define MAX(A, B) (A > B ? A : B) 01:30
Keybukthat's a tricky one, because it evaluates both A and B twice01:31
Keybukso MAX(a++, b++) will expand to (a++ > b++ ? a++ : b++)01:31
theCorethe pleasure of side-effects01:32
Keybukso if a was 3 and b was 4, then you'd get 5 as the value, and a would be 4 and b 601:32
=== _ion [i=johan@kiviniemi.name] has joined #upstart
Keybukthere's a gccish way of writing that01:32
Keybukbut it only works if you know the types01:33
theCore#define MIN(A,B) ((A) < (B) ? : (A) : (B))01:33
Keybuk#define maxsize_t(a,b) ({size_t _a = (a), _b = (b); _a > _b ? _a : _b; })01:33
theCoreoh, #define MIN(A,B) (A <? B)01:33
KeybukI've never heard of "<?"01:33
theCoreI just learned it01:34
Keybukthose are C++ extensions only, no?01:35
theCoreI don't know01:35
Keybukthe only note I can find in the gcc 4.1 manual is01:35
Keybuk The G++ minimum and maximum operators (`<?' and `>?') and their01:35
Keybukcompound forms (`<?=') and `>?=') have been deprecated and will be01:35
Keybukremoved in a future version.  Code using these operators should be01:35
Keybukmodified to use `std::min' and `std::max' instead.01:35
theCorethat makes sense01:36
theCoreC++ STL is way more powerful than C's preprocessor01:36
KeybukI don't really like C++01:37
Keybukif they wanted to make a new language, they should have unbolted it from C01:37
Keybukinstead they ended up with a hideous half-breed01:37
Keybukboth Java and C# are far more elegant01:37
theCorewell, it depends of your point of view01:37
Keybukthe principal thing about C++ that I hate is that it still has header files01:38
theCorebut, I agree that Java and C# are more elegant01:38
Keybukwhich artificially separates your class structure and code01:38
KeybukAND by inference, exposes your private information to anyone reading them01:38
Keybukthey should have dropped the pre-processor, and made cpp files self contained units that could be referenced01:39
theCoreI agree, but I don't think we will ever see a such change in C++01:41
Keybukwhich is a shame01:41
Keybukthe obvious bogosity is "#define private public"01:41
theCoregcc has improved01:54
theCorethe MAX macro works 01:55
=== j_ack [n=rudi@p508D8897.dip0.t-ipconnect.de] has joined #upstart
=== kwwz [n=kwwz@] has joined #upstart
=== _paulfm [n=paul@c-24-8-141-71.hsd1.co.comcast.net] has joined #upstart
_paulfmhi everyone03:27
_paulfmIs anyone home? :-)03:33
_paulfmI am looking for some upstart help... I have just built it on Debian etch (testing)03:35
_paulfmI am hesitant to do a make install.... Im worried I may hose the init system03:35
_paulfmIf I reconfigure and build.. with the /opt/upstart prefix03:35
_paulfmhow do I start upstart at boot... so my upstart tests get run... but I leave the "regular" init in place03:36
_paulfmhmmm... nobody home03:49
=== dns_server [n=dns@ppp246-215.static.internode.on.net] has joined #upstart
dns_serveris anyone around that can help me write a script?04:21
=== wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart
=== jonib1 [n=jonas@ua-83-227-144-18.cust.bredbandsbolaget.se] has joined #upstart
popeyhmm - wrong channel :)10:57
Keybukcows are welcome here11:03
=== juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
Seveascows make good meat12:19
Keybukthey do indeed12:24
=== 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
_paulfmhellooo...doe anyone here use upstart on debian07:53
=== _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

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!