Linux-Development-Sys Digest #124, Volume #7 Mon, 30 Aug 99 15:14:19 EDT
Contents:
Re: why not C++? (Kaz Kylheku)
ext2 and changing "reserved space" (is there a tunefs for ext2?) (Matija Grabnar)
Re: Avoid Zombies (Kaz Kylheku)
Re: MySQL, chroot and shared libs ("Sean O'Dell")
Problem With dlopen()'d Libraries ([EMAIL PROTECTED])
iBCS2 emulator and kernel 2.2.x - help needed - urgent (Markus Lang)
Re: ext2 and changing "reserved space" (is there a tunefs for ext2?) (Thomas Zajic)
Re: Kernel compile problem with (P)GCC 2.95 (Andreas Spengler)
where i can get libXm? ("tony lee")
Re: why not C++? (Nix)
Re: Jesus: the ultimate OS (Nix)
Re: Shutdown Problem (Nix)
My Boot-Loader: No Root FS :(( ([EMAIL PROTECTED])
Re: MySQL, chroot and shared libs ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 30 Aug 1999 15:25:19 GMT
On 29 Aug 1999 15:29:10 -0700, Don Waugaman <[EMAIL PROTECTED]> wrote:
>Sigh. I enter yet another language flamewar.
>
>I have little hope of convincing anyone who has followed this far, least
>of all NJR whose opinion is expressed so vehemently. However, there are
>some parts of his post I'd like to touch on, along with some blatant
>errors in fact I'd like to correct.
>
>In article <[EMAIL PROTECTED]>,
> <[EMAIL PROTECTED]> wrote:
>
>[ snips ]
>
>>My point was that he's added even more pointless and obscure things to C++
>>such as reference variables. What the hells the point of those when you
>>already have pointers?
>
>References are extremely important for use with operator overloading
>and templates.
These are non-essential reasons for their existence.
>I'll moan about operator overloading later; the use of
>templates and generic programming is quite possibly the most powerful
>and farthest-reaching use of the C++ language, and the absence of
>reference variables would weaken templates to the point of near-uselessness.
I use templates without references plenty of times. In fact, I can't recall the
last time I used a reference in conjunction with a template. When it comes to
containers, I put pointers into them, rather than references. Small objects
can be stored in the container directly; you just ensure that the default
constructor is cheap in case the container needs a dummy sentinel node.
The only time you need to use references is in defining copy constructors and
assignment operators. These language features could have easily been designed
around pointers instead of references; there is no inherent, essential need for
references.
>References also cannot be induced to point to NULL in a strictly-conforming
>program, which can eliminate a lot of checking of input conditions (or more
>practically, since most C routines don't check their input parameters
>anyway, can make the use of such routines much more reliable).
Most real world software isn't a strictly conforming program. You can readily
create pointers that are never null. Also, a pointer can be const qualified
which prevents it from being re-seated, just like a reference.
int x = 42;
int * const p = &x;
Now p can't be modified to be null or to point at anything other than x. The
only difference between p and a reference is syntactic sugar, whose value is
dubious, because it masks the potentially dangerous aliasing that is going on.
------------------------------
From: [EMAIL PROTECTED] (Matija Grabnar)
Subject: ext2 and changing "reserved space" (is there a tunefs for ext2?)
Date: 30 Aug 1999 15:03:01 GMT
Reply-To: [EMAIL PROTECTED]
I have fairly large (5GB) partition dedicated to users. The partition is
running out of space writeable by users - however there is still enough
space writeable by root. This is because the system retains some percentage
of every file system which is _only_ writeable by root. On small partitions,
10% reservation makes sense. However on a 5GB partition the reserved space
is too large.
In solaris, there is a utility called tunefs which can adjust the ammount
of space that a particular partition reserves for system. I there a similar
utility for Linux's ext2? Where can I find it? Is it even theoreticaly
possible to change this, or is 10% hardwired somewhere?
--
"My name is Not Important. Not to friends.
But you can call me mr. Important" - Not J. Important
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Avoid Zombies
Reply-To: [EMAIL PROTECTED]
Date: Mon, 30 Aug 1999 15:12:45 GMT
On Mon, 30 Aug 1999 16:31:41 +0200, Sven Heursch
<[EMAIL PROTECTED]> wrote:
>Hello,
>
>I have now idea how do avoid Zombies which are created from threads over
>the pthread_exit() call.
>Any ideas?
Threads that are not marked detached must be collected with pthread_join().
------------------------------
From: "Sean O'Dell" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.security
Subject: Re: MySQL, chroot and shared libs
Date: Mon, 30 Aug 1999 08:14:57 -0700
I just did from the shell and it simply says it can't run /sbin/ldconfig, as
I would expect since /cage doesn't exist. But I knew what you meant and
replaced /cage with the root directory of my program and it says "cannot
execute /sbin/ldconfig" again as I would expect since within the chrooted
environment, /sbin/ldconfig doesn't exist. But I knew what you meant so I
created a hard link that mimiced the existence of /sbin/ldconfig and tried
again and it did something I didn't expect finally. It said can't open
/usr/lib nor /lib, which, while I didn't know about ldconfig, isn't
surprising since within the chrooted environment, /usr/lib and /lib do not
exist, nor can I create hard links to directories to make them exist there.
So, except for the fact that I'm looking into ldconfig as some sort of
possibility towards creating hard links to libraries my program needs (which
I'm not sure it does), I'm back to where I started.
Thank you for mentioning ldconfig though. At least I have somewhere to look
now.
-Sean
<[EMAIL PROTECTED]> wrote in message
news:7qdpnq$n3p$[EMAIL PROTECTED]...
> Have you done "chroot /cage /sbin/ldconfig" ? If you haven't, you should.
>
------------------------------
From: [EMAIL PROTECTED]
Subject: Problem With dlopen()'d Libraries
Date: Mon, 30 Aug 1999 16:00:43 GMT
Hopefully somebody can help me out with this. I'll even try to be
clear with what the problem is. (But let me know if there's confusion
on it...I'm confused enough without everyone else's coconfusion. ;)
What I'm doing is writing a program that can be expanded through the
use of runtime-linked libraries. It has a lot of things that can be
expanded, but the problem is consistent across all of them, so I'll
just give a bit of an example.
The main program dlopen()'s the library, does a dlsym("load_module"),
and calls the resulting function pointer to allow the library to
initialize its hooks into the main program. One example of this would
be adding a new command to a language interpreter. Here are some code
snippets to help illustrate: (Note that, although the code is C++, I
have determined that that is not the root of the problem.)
-- main.h --
class Hash {
protected:
// Implementation of a hash table goes here.
public:
// Rest of interface, including constructor, et al, goes here.
add(char *, void *);
};
extern Hash command_hash;
============
-- main.cpp --
#include "main.h"
Hash command_hash;
int main(void) {
char *libname;
void *handle;
void (*func)(void);
libname = getlibname(); // We'll pretend, for the sake of simplicity,
// that this returns the right thing.
handle = dlopen(libname);
func = dlsym(handle, "load_module");
func();
return 0;
}
==============
-- module.cpp --
#include "main.h"
extern "C" {
void load_module(void);
};
void new_command(void) {
// ~I wanna new command, one that won't crash my box...~
}
void load_module(void) {
command_hash.add("NC", (void *) new_command);
}
================
This works perfectly well on my IRIX 6.2 box, but Linux won't allow the
dlopen() to work, complaining about command_hash being an unresolved
symbol. A call to dlerror() immediately after the dlopen() will
return "undefined symbol: command_hash". Is there a way to let dlopen
()'d libraries use symbols from the dlopen()ing program? Thanks for
any help I get on this. It is greatly appreciated.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: Markus Lang <[EMAIL PROTECTED]>
Subject: iBCS2 emulator and kernel 2.2.x - help needed - urgent
Date: Mon, 30 Aug 1999 17:47:49 +0200
Hi,
I've a problem with the iBCS emulator and SMP support.
With kernel 2.2.10, 2.2.11 and 2.2.12 and a non-SMP-
kernel the emulator just works fine.
But our production server is an SMP machine (Intel, Pentium
II,
Asus board). With a SMP-enabled kernel I can't 'insmod' the
iBCS emulator. It fails with:
/lib/modules/2.2.12/misc/iBCS: unresolved symbol kernel_flag
According to the ChangeLog this is the version from Nov, 5
1998
(fetched from:
ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/ibcs-2.0-981105.tar.gz)
I tried 2.1.981105, too.
With other versions I get either compilation errors or two
screenfull
of missing-symbols-messages, so this is an improvement, but
still,
it doesn't work (using a non-SMP-kernel, of course, does not
work
either)..
If you use "USE_VERSIONS=no" in the CONFIG file, you'll get
lots of
this "unresolved symbol"-messages. If you set this to "yes",
the
message cited above is all you get.
What's wrong with that? What did I miss? Are there newer
versions
out I'm not aware of?
Please help me! I'm severely frustrated, and this is our
production
system which should run very soon (we're working on an old
non-
SMP-system for now, which has less RAM and is painfully
slow,
so I'm overwhelmed with complaints about performance).
Any help is appreciated. Many thanks in advance.
Ciao,
Volker
------------------------------
From: [EMAIL PROTECTED] (Thomas Zajic)
Subject: Re: ext2 and changing "reserved space" (is there a tunefs for ext2?)
Reply-To: [EMAIL PROTECTED]
Date: Mon, 30 Aug 1999 16:36:14 GMT
On 30 Aug 1999 15:03:01 GMT, Matija Grabnar <[EMAIL PROTECTED]> wrote:
> [ ... ]
> In solaris, there is a utility called tunefs which can adjust the ammount
> of space that a particular partition reserves for system. I there a similar
> utility for Linux's ext2? Where can I find it? Is it even theoreticaly
> possible to change this, or is 10% hardwired somewhere?
It�s called tune2fs, and it�s part of the standard e2fsprogs
package. Most probably it�s already installed on your system.
HTH,
Thomas
--
=-------------------------------------------------------------------------=
- Thomas Zajic <thomasDOTzajicATtelewebDOTat> Linux-2.0.37/slrn-0.9.5.7 -
- "It is not easy to cut through a human head with a hacksaw." (M. C.) -
=-------------------------------------------------------------------------=
------------------------------
Date: Mon, 30 Aug 1999 19:37:50 +0200
From: Andreas Spengler <[EMAIL PROTECTED]>
Subject: Re: Kernel compile problem with (P)GCC 2.95
Peter Samuelson wrote:
> [Andreas Spengler <[EMAIL PROTECTED]>]
> > I recently upgraded my compiler to GCC 2.95 and now whenever I try to
> > compile a kernel (tried it with 2.3.11-15 and 2.2.9) and do a make
> > bzlilo, towards the end I get the warnings
> > Warning; using %eax instead of %ax due to ..... ???
> > When I reboot the system the kernel hangs at
> > Uncompressing Linux. OK. Booting kernel......
>
> Funny, doesn't happen here. From your target `bzlilo' I assume you're
> on i386. Are you sure gcc is getting the flag `-fno-strict-aliases'
> like gcc 2.95 needs? Recent (2.2.12 and 2.3.something) versions of the
> Makefile take care of this automatically but IIRC 2.2.9 does not.
>
> Come to think of it I use the `bzImage' rather than the `bzlilo' target
> ... but I doubt that's the difference here.
>
Yes, the (p)gcc get�s -fno-strict-aliases. And no, no version of gcc, be
it 2.95, PGCC 2.95
or the older PGCC-1.1.3 make a bootable kernel........
Sob,
Andreas Spengler
>
> --
> Peter Samuelson
> <sampo.creighton.edu!psamuels>
------------------------------
From: "tony lee" <[EMAIL PROTECTED]>
Subject: where i can get libXm?
Date: Mon, 30 Aug 1999 12:53:24 -0400
Hello
when i install Cforge, i rpm it and it came out: libXm need by XXX
i m wondering libXm is in which package and where i can download it?
This is emergency, please reply to [EMAIL PROTECTED]
i m using SuSE 6.1
Thanks
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: 30 Aug 1999 00:48:28 +0100
[Why isn't this on comp.lang.c++(.moderated)?]
[EMAIL PROTECTED] writes:
[on overloaded whitespace]
> Why doesn't it surprise me that Stroustrop came up with this lame idea.
Oh, for goodness' sake...
It wasn't *intended* to be a brilliant idea.
As you'd know if you'd read the paper (available online at
http://www.research.att.com/~bs/whitespace98.pdf), it *was* an April
Fool's joke. He suggests outlawing multicharacter identifiers in the
same paper, for goodness' sake.
> For a man that had the opportunity to clean up the C syntax and make it
> more readable yet managed the impressive task of making it even more of an
> dogs dinner than it already was, he really should have learnt his lesson by
> now.
_The Design and Evolution of C++_ makes it quite clear that just about
every place in C++ where syntactical complexity was added it was
needed. The only two probable errors highlighted there were the syntax
for pure virtual methods (added in a tearing hurry prior to the release
of Cfront 2 because it was forgotten about), and the syntax for
templates (the angle brackets added too much complexity and ambiguity to
the parser).
The areas which should have been cleaned up which were not were
principally `switch' and the declarator syntax. It is notable that Java,
unhindered by the goal of C compatibility, kept those particular horrors
of the C syntax.
For a language that tried to do everything, C++ did a good job of
avoiding ending up like Ada. Unfortunately it still fell prey to the
second-system effect, but not much.
> I just wish academics like him would crawl back into their ivory towers
> and shut the doors for good since they seem to forget that programming
> languages are tools to be used by people, not machines, and therefor should be
> as syntactically clear as possible, not look like line noise.
As D&E makes clear, practical considerations were paramount throughout
the design of C++. The very compatibility with C about which you
complain was maintained to make it easier for *practical* programmers to
migrate! Features were never added unless there was an existing
implementation which did not add inefficiency to the language; 2%
inefficiencies (eg in the inheritance scheme) caused rewrites and in one
case (IIRC) a language redesign.
And C++ does not look like line noise unless you do not know it well
enough.
You can write stuff that looks like gibberish in C++, to be sure --- but
you can write such in *any* language. C++ is not particularly evil for
allowing that itself.
Where C++ may perhaps be at fault is that it is sufficiently complicated
that only now (15 years after the language was born) are compilers
widely appearing that implement it properly...
... although C had a similar gap, come to think of it (~'72 --- ~'92) so
perhaps we shouldn't criticise C++ for that, either.
Not that any of this makes it any more sensible to reimplement the Linux
kernel in C++...
> NJR (a C/C++ programmer for 15 years)
You were using C++ in 1984? Really?
--
'- I can't believe my room doesn't have Ethernet! Why wasn't it wired
when the house was built?
- The house was built in 1576.' --- Alex Kamilewicz on the Oxford
breed of `conference American'.
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: Jesus: the ultimate OS
Date: 30 Aug 1999 01:02:25 +0100
Nix <$}xinix{[email protected]> writes:
> "Christopher R. Thompson" <[EMAIL PROTECTED]> writes:
> > Java will always require a
> > translator and therfore an inefeciancy.
>
> Wrong:
Pardon me, you are right, but it does not negate my point.
*All* languages save for raw opcodes require translators. They're called
`compilers' or `assemblers'. Yes, they take time to run, and thus are
`an inefficiency'. But until someone builds a CPU which natively parses
Java source[1] and runs the code, this will remain true of Java.
[1] note that handling the bytecode isn't enough, as you still need a
translator to get it that far, and the whole point of this is to
avoid translators, as they are `inefficient'.
--
'- I can't believe my room doesn't have Ethernet! Why wasn't it wired
when the house was built?
- The house was built in 1576.' --- Alex Kamilewicz on the Oxford
breed of `conference American'.
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.x
Subject: Re: Shutdown Problem
Date: 30 Aug 1999 01:07:32 +0100
Greg White <[EMAIL PROTECTED]> writes:
> I'm no expert on the subject, but couldn't you use the -sync option
That depends how slow you want everything to run (and mounting with -o
sync is *slow*.)
--
'- I can't believe my room doesn't have Ethernet! Why wasn't it wired
when the house was built?
- The house was built in 1576.' --- Alex Kamilewicz on the Oxford
breed of `conference American'.
------------------------------
From: [EMAIL PROTECTED]
Subject: My Boot-Loader: No Root FS :((
Date: Mon, 30 Aug 1999 18:05:17 GMT
Hi !
I�m writing a real cool boot-manager with lots of cool features,
virus-protection, virus-detection and stuff.
Well, I noticed in most any linux docu that it could not be
booted if the image is not located in the 8 GB limit.
Because of that I wrote direct-Linux support. I defined a
new partition (8Ah) and wrote a program, which writes the
kernel image to that. (why did nobody do such thing?)
Then I did the loader, which is working, BUT (hehe, you knew it)
Linux says something about "no root FS" and that�s it :(
I know there�s a command-line, but I could not figure out
how to get that working.
What do I have to do ?
(Please: Reply via E-MAIL, if you reply to this ng, I will never
receive your response)
cu Nasty7
--
--- Nasty7^NMC
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.security
Subject: Re: MySQL, chroot and shared libs
Date: 30 Aug 1999 18:57:09 GMT
In comp.os.linux.development.system Sean O'Dell <[EMAIL PROTECTED]> wrote:
[ summary: mysql can't connect to local mysql server in
a chroot'd environment ]
Mysql makes a named pipe in /tmp for local connects. I'd bet
your chroot'd environment doesn't have /tmp, or doesn't have
the named pipe that mysql needs.
Regards,
Craig
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************