[KLUG Programming] Pthreads problem

Robert G. Brown programming@kalamazoolinux.org
Sat, 03 Jan 2004 06:38:24 -0500


On Sat, 03 Jan 2004 05:02:48 -0500, Peter Buxton wrote:

>... your MUA has sufficient abstraction to turn that off, please?
Yes, Why look at that, it does, and I didn't have to use echo! :)

>On Sat, Jan 03, 2004 at 12:47:50AM -0500, Robert G. Brown was only escaped
>  alone to tell thee:
>>>net.ipv4.tcp_syncookies = 1
>>>to 
>>>echo 1 > /proc/sys/net/ipv4/tcp_syncookies
>>Actually, it's probably a shell script, using sed/awk/grep and so on.
>It was sarcasm. Apparently, I wasn't the only tired one.
Oh-h-h-H-H-H-h-h-.. sarcasm. I've NEVER heard of that! :)

>>Before I knew about sysctl (maybe before it was even introduced), I
>>wrote a script which looked like this:...
>Congratulations. You've introduced a marvelous layer of abstraction in
>/proc, an area that is not only Linux-dependent, but also kernel version
>dependent. 
Thank you, thank you. That was exactly my intent, to abstract away some
of these things from scripts that need to be portable to different platforms.

>Congratulations on having to update setkernel(1) for the rest
>of your life,...
That's OK, I'm paid to do that, setkernel is part of the whole system I'm
maintaining. After that relationship ends,  setkernel is already in the
documentation the customer has, along with any other information they will 
need to maintain the system. I understand that setkernel and other software
I've written will probably last longer than my involvement with the system,
and that's already factored in. This is completely normal; what's the prob-
lem?

>...what is really burning me up is curiosity as to the
>authoritative sources you're appealing to in saying that not using
>sysctl, in the manner I showed, and in the situation I showed...
Then combust, 'cuz I don't think you understand where I'm coming from.
I'm not "appealing" to any "authoritative sources"; I don't have to.

We still haven't heard from Adam on this, but as I said in my last message,
he may have completely different motives for disliking echo, and I'm not
going to speak for him. For the same reason, it doesn't seem appropriate
to lump the two of us together as if we are speaking for each other.

I'm not going to cite any "authoritative sources", 'cuz I don't need to.
If you want a list of books about OO Design and so on, I'll be happy to
provide you with something like a bibliography, but you'll never find
text like "echo is bad, abstract it", since this sort of material doesn't 
deal with things on those terms, or at that level.

But I'll tell you what happened. I've internalized a lot of stuff from
all those books, and the experience of writing software and building 
systems. Somewhere along the way, I've had a few ideas pop into my head
that no one had to tell me, and I didn't need additional directions. I
tried out these ideas, and some of them have turned out to be helpful.
One of the very trivial ones is called setkernel.

>I mean, when Linus and Robert Love seem happy with /proc, I'm
>just a little curious...
Linus and Robert Love have their problems, and I have mine. I don't
think it's a big deal to write something that, for purposes of better
support, does not echo (so to speak) every choice made by the kernel 
team.

A lot of software is an abstraction of, and composition on, existing
software. Any script that uses echo to modify kernel settings also
falls into this category. Shall I ask Linux if I can create THOSE
abstractions, too?

Linus cheerfully doesn't care, and I believe he would certainly stand
up for my right to create such constructs. He might even agree that 
they're useful. Rest assured that if he doesn't, I don't care, since
I find it useful in practice.

>...as to the as yet unspoken identity, or identities,
>of one or more kernel maintainers who hold that echoing values into
>/proc is harmful and overdue to be obsoleted.
Hey, maybe they exist, but I'm certainly not in touch with 'em, and 
it doesn't really matter to me if they win the fight or not. That's one 
of the very nice things about this technology; one can take reasonable
(and sometimes trivial) steps to protect oneself against changes others
may introduce, and that actually increases the freedom everyone has.

I'm not on any soapbox to obsolete anything, and any such characterization
of what I've said is neither accurate or correct. I simply believe that
there's a better way to write scripts that are going to be in production,
where other values (like ease of maintenance) become important.

If you don't buy what I've written, that's fine too. Ya don't hafta!

>I mean, if these are just yours and Adam's opinions...
I've given my opinions, and provided a brief summary of how it is put 
into practice, and an explanation of the benefits. Adam may have different
opinions, and that's OK with me.

>I should think my /proc habits hardly merit your attentions: ...
They don't. I felt your comment about echo merited one short reply.
Then, having been asked about my position with such vigor, I explained,
not only for your information, but for the 230+ people who get these 
messages.

>you would get far more mileage if you critique my indenting style or 
>my choice in window managers...
Mileage? What's mileage (in this context), and why would I want any?

I don't really care about that other stuff very much, and frankly it's
a pity that you feel picked on. This isn't personal.

>Otherwise, I feel left out and in the cold that, seemingly, thousands of
>Linux hackers know that sysctl(8) is The One Right Thing but no one seems
>to be willing to show me the relevant press releases.

Peter, you're going to have to ask one of the Linux hackers who feels 
that way, 'cuz I don't, and I'm not really a Linux hacker in any case.

But if you need a warmer jacket or some firewood to be more comfy out 
there in the cold, I'll be happy to pass you some! :)

							Regards,
							---> RGB <---