Linux-Development-Sys Digest #636, Volume #7 Tue, 29 Feb 00 03:13:13 EST
Contents:
Re: Why a file system ? (Christopher Browne)
Re: glibc development language (Christopher Browne)
Re: clone() and shared library heap allocations ("Frank V. Castellucci")
processes surviving shell shutdown ("Pierre-Marc Fournier")
Re: clone() and shared library heap allocations ("Frank V. Castellucci")
Re: processes surviving shell shutdown ([EMAIL PROTECTED])
Re: glibc development language ([EMAIL PROTECTED])
Re: Detecting installed Harddrives (Josef Moellers)
an alternate default for LILO ([EMAIL PROTECTED])
Re: how to get the specific source code? (Josef Moellers)
Re: telnetd stopped working (Toomas Gavrilin)
I need help setting up my ethernet card... ("Jae H. Choi")
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Why a file system ?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 29 Feb 2000 02:08:35 GMT
Centuries ago, Nostradamus foresaw a time when Nicolas Boulay would
say:
>I know it's look like a very odd question.
>
>But in fact, file system it's a way to stock file. Files are from 2
>types : program and data.
>
>If you code, we can say that your program are data. But usualy, you
>nevermind absolutly about all the file under the directory of an
>application. You use the application and create some datas. Sometimes,
>you have the same data for differents applications.
>
>So, you need a kind of data base with your data connected to the
>application which can read it (throught the MIMe type ?). And the
>application are only visible by her name, not by a sudirectory and 100
>internal files plus some link.
>
>For expert, it could look strange to think like that. But for a
>beginner, it's more logic. Maybe we can imagine that the used program
>can only see their datas, it could be great for security reasons. And
>libraries could be managed by such system linked to program with a
>system to better manage dependancies. So you could remove a programm
>without any problem and you can warn the user that some documents could
>not be read any more that a library is not useful any more (and you
>don't leave the remove function of the application to do it because
>(microsoft syndrom) it could remove a library used by an other programm
>or never delete their own odd library and your system become bigger and
>bigger ;o) ).
>
>I know that replace file system by data base is not possible because of
>the performance. But i have read that
>hurd contain some fonctionnalites to see a programm or file like a
>subdirectory. And i imagine that it's possible to have a file system and
>a data base with pointer on it.
There are most definitely some common features between databases and
filesystems; there has been convergence of functionality, particularly
with regards to the "journalling" filesystems. The notion of
journalling is something that was developed initially to build
reliable database systems.
>I have read some months ago that microsoft want to include sql server
>in it's new OS.
>
>This kind of ideas came to me when i try to manage the 300 Mo of
>documentation or application download on the net, or when i try to
>refind a data file which i can't remember where i put it. Or when (on
>windows, soory) i move a directory to clean my HD but finally it's crash
>the system. In fact, this system could looking for what you doing and
>made some alarm.
>
>I know that there is many means to answer to those question. Using find
>or locate, creating it's own little data base to manage
>documentations and never work under root login. But this problem appears
>every days, usualy a common user, erase this partition every
>4 months to have a clean system. I know that i speak for Wxx. But for
>linux, if you don't manage to install correctly in the good directory
>your application in tgz, your system could become very dirty in few
>month.
>
>I know that you can used rpm or some other pakage manager but each
>distributions have their own system. And i beleave that the power of
>linux is the source. So why not create a pakage manager which contain
>only the source and make the compilation with the information given by
>the system ?
>
>The idee is to have a global answer to all of his question. Maybe i
>think too big or to complicate. Or i forgot some important point. So i
>wait for your comment.
A relevant "throw away" comment is that I think some of the Debian
folk are working on using LDAP to *publish* package management
information.
There is certainly room to use the (from-database management) notion
of having multiple "views" on data. In SQL, you can create something
called a "view," which is a sort of "virtual table" that is a closure
that may join together tables and some implicit selection criteria.
It is certainly a reasonable idea to do the same sort of thing with a
filesystem, having some alternative views on data.
But the notion of pushing everything into databases is not
realistically useful.
In particular, I would contend that it does not do anything to keep
the system "clean."
In the same manner that you can see a file system get "crufty" when
people strew trash everywhere, a database system can suffer from
*exactly the same problem.*
I work with a system called R/3, where programs are not stored in
files, but rather in one Rather Big SQL table. This does *not* lead
to things being particularly more manageable; you wind up with there
being HUGE quantities of "junk" in that one table, and the lack of
the hierarchy you'd find in a filesystem creates some problems that
you didn't have with a filesystem.
Of course, all of this has been ignoring the fact that the fact that
in UNIX, everything is a hierarchy of files is generally considered a
FEATURE rather than a bug.
The likely direction is *not* to move towards "everything becomes a
database;" it is more likely that people may create front ends that
allow databases to be treated as if they were hierarchical
filesystems.
It would, for instance, be a slick idea if I could do:
% mkdir ~/Databases/mydb
% usermount -t gdbm ~/DBs/something.dbm ~/Databases/mydb
% cd ~/Databases/mydb
% ls
key1
key2
key3
key4
key5
where the mapping would be that each file in the directory is named
after the key in the GDBM DB, and the contents of the file are the
values associated with the keys...
Something similar could be done for an SQL DBMS:
% usermount -t postgresql "localhost:3144 somedb userid password" \
~/Databases/thebigdb
and you'd be able to see a directory of tables and such...
--
"There must be some way to read input from the terminal...."
-- Mly
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/unix.html>
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: glibc development language
Reply-To: [EMAIL PROTECTED]
Date: Tue, 29 Feb 2000 02:08:33 GMT
Centuries ago, Nostradamus foresaw a time when Alexander Viro would say:
>In article <8947kb$[EMAIL PROTECTED]>, tye4 <[EMAIL PROTECTED]> wrote:
>>Christopher Browne <[EMAIL PROTECTED]> wrote in message
>>news:bM0t4.37328$[EMAIL PROTECTED]...
>>> Centuries ago, Nostradamus foresaw a time when tye4 would say:
>>> >The GNU guidelines in http://www.gnu.org/prep/standards.html
>>> >state that it is better to use only C for glibc development.
>>> >I've been developing C++ code for glibc. Is this a strict requirement
>>> >or is it okay to use C++ for glibc
>>>
>>> I think you're confused.
>>>
>>> Only C is used to develop GLIBC, because GLIBC is a C-oriented
>>> library. It might be well and nifty to write portions of GLIBC in
>>> Intercal or Emacs Lisp; that would *not* be a good thing for anyone
>>> that intends to actually deploy GLIBC.
>>>
>>I'm not confused. C++ can indeed be used to develop libraries for C
>>programmers.
>>extern "C"
>>{
>> void c_func1(int foo, int bar);
>>}
>>
>>C++ is a standard for all these years. I don't quite understand the
>>reluctance in using C++ for system development in Linux.
>
> Nausea? You know, vomit makes keyboards stuck and not everyone got
>sufficiently strong stomach... That, and lack of examples where C++ would
>be successfully used for system development. Probably related to the previous
>reason... Heck, even in NT kernel (and I suspect the core libraries) are
>in C - C++ is used for GUI crap atop of that. And no, Be is not a valid
>example.
> It's UNIX, deal with that. If you want to use C++ - fine, just stay
>the fsck out of the core stuff when you get such an urge.
That's one answer; others that are forcibly true are thus:
-> While C++ may *now* be a standard, that has only been true for a bit
over a year.
-> While C++ may have a standard for the *language,* I defy anyone to
describe a standard for the ABI. No ABI means that you can't
expect programs to work with libraries other than the one that they
were originally compiled with.
Interoperability is *still* a problem unless you include all libraries
you might need into the binary.
I don't think it's too likely that Linus would admit 4MB of STL into
the kernel :-).
But it is certainly fair to say that amongst the community of Linux
kernel developers:
- C gets "high marks"
- C++ *doesn't*
If anyone wants to create an OS kernel in C++, they are free to start
a project to do so. And they are free to *leave Linux alone.*
--
What is the difference between a robot and a duck?
Answer: A duck floats when you throw it in the water.
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/c.html>
------------------------------
Date: Mon, 28 Feb 2000 22:30:49 -0500
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Subject: Re: clone() and shared library heap allocations
Ulrich Weigand wrote:
>
> "Frank V. Castellucci" <[EMAIL PROTECTED]> writes:
>
> >No, it is rather involved. BUT, I even added a debug string in the method that is
> >being called in the real code, and it is never output! This makes me think that the
> >rtl heaps between shared libs, and multiple threads has some kind of quirk. If you
> >need a more detailed code example, I can post it.
>
> This does *not* work. If you use clone() directly, libc is not aware
> that multiple threads are running, and does not protect against
> re-entrancy. Note that even if you compile with -D_REENTRANT,
> this is still true, because in this case, libc tries to protect its
> critical sections with pthreads synchronization mechanisms; but as
> you don't link with libpthread, those routines are not present, and
> thus the synchronization calls are silently omitted.
>
> You have two options: Either, you do it the 'intended' way and use
> pthreads, i.e. use pthread_create() to create your threads, and
> compile/link everything with -pthread, or else you do it the hard
> way and use clone() directly, in which case you have to implement
> your own synchronization mechanisms and make sure that libc is never
> entered by two threads at the same time.
>
> --
> Ulrich Weigand,
> IMMD 1, Universitaet Erlangen-Nuernberg,
> Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688
In essence I have done it the direct way, I have insured that there is
only one thread operating in libc at one time, the result is still the
same.
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
------------------------------
From: "Pierre-Marc Fournier" <[EMAIL PROTECTED]>
Subject: processes surviving shell shutdown
Date: Tue, 29 Feb 2000 04:14:30 GMT
Hello,
I am trying to start a process that will not end when I logout from a
session (like an ftp download). I read about nohup and tried it but it
didn't work : the process starts but ends like if I hadn't used nohup.
Running redhat 6.0...
Thanks in advance,
Pierre Fournier
------------------------------
Date: Tue, 29 Feb 2000 00:00:22 -0500
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Subject: Re: clone() and shared library heap allocations
I found the problem but will note the issues concerning re-entrancy in
the rtl.
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: processes surviving shell shutdown
Date: Tue, 29 Feb 2000 05:25:03 GMT
On Tue, 29 Feb 2000 04:14:30 GMT Pierre-Marc Fournier <[EMAIL PROTECTED]> wrote:
| I am trying to start a process that will not end when I logout from a
| session (like an ftp download). I read about nohup and tried it but it
| didn't work : the process starts but ends like if I hadn't used nohup.
| Running redhat 6.0...
If the program specifically tries to do something with the controlling
tty, that operation will fail, and the program may abort as a result.
It might depend one what your program is doing.
--
| Phil Howard - KA9WGN | for headlines that | Just say no to absurd patents |
| [EMAIL PROTECTED] | really matter: | Boycott Amazon.Com (AMZN) |
| Dallas - Texas - USA | linuxhomepage.com | Shop http://bn.com/ instead |
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: glibc development language
Date: Tue, 29 Feb 2000 05:51:56 GMT
On Tue, 29 Feb 2000 02:08:33 GMT Christopher Browne <[EMAIL PROTECTED]> wrote:
| But it is certainly fair to say that amongst the community of Linux
| kernel developers:
| - C gets "high marks"
| - C++ *doesn't*
Masses of applications programmers are using C++ because that is what
Microsoft sells to the companies they work for.
My first turn off from C++ occurred when I met a programmer working as
an applications developer for a major corporation. He stated that all
you need to do to make sure your program is object oriented is just do
the coding in C++. When I asked him how he applied object oriented
principles to the system design, he replied that he didn't need to worry
about that because he was using C++.
I was hoping this was an isolated case of an incompetent programmer.
But it was not. I've run into many others like that who have little
or no idea how to really make a system work regardless of the language,
and end up using their language as a crutch. I worry how many other
programmers _think_ they are doing things right just because they happen
to be coding in C++. To some extent the language developers are at fault
for actually pushing the idea that "using language XYZ will make things
better".
That doesn't make C++ a bad language. However, something I find happening
is that the easier the language gets (such as C++ or Perl or Java), the
lower the barrier becomes for admitting lower grade programmers. Business
seems to need larger numbers of them (although I'm not sure this is entirely
true) so anything that makes it possible to have more is what they will do.
C++ has more programmers than C because C++ has lowered the barrier. But
does a larger number of programmers because of a lower barrier mean that
those who would be programmers anyway *must* use C++ (not to disparage any
that choose to do so)? I think not.
If we used this line of reasoning, we'd all also just forego using Linux
and switch to MS Windows. Most people who use computers use MS Windows.
I have my reasons for not using C++. As long as C functions well as a
programming language I'll continue to use it. I don't see why it will
break any time soon.
| If anyone wants to create an OS kernel in C++, they are free to start
| a project to do so. And they are free to *leave Linux alone.*
It might be interesting to see just how such a project turns out. Be sure
to not using ANY non-object oriented language anywhere in the whole project.
Then do one in Java.
--
| Phil Howard - KA9WGN | for headlines that | Just say no to absurd patents |
| [EMAIL PROTECTED] | really matter: | Boycott Amazon.Com (AMZN) |
| Dallas - Texas - USA | linuxhomepage.com | Shop http://bn.com/ instead |
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Detecting installed Harddrives
Date: Tue, 29 Feb 2000 08:13:46 +0100
Benjamin Lippelt wrote:
> =
> Hi,
> =
> how can I find out which harddrives are installed (e.g. /dev/hdc1) on a=
> Computer ? Is there a configuration-file or a kernel-function ?
First of all, strictly speaking, /dev/hdc1 isn't a "harddrive", but a
partition or slice, whatever you want to name it. /dev/hdc would denote
the hard drive.
You can find that information in the /proc subdirectory, e.g.
/proc/devices will tell you that there are devices "ide0" and "ide1",
then /proc/ide/ide0 and /proc/ide/ide1 will tell you that there are
devices called hda, hdb, and hdc.
Similarly you could look at /proc/scsi/scsi to find out about scsi
disks.
You can then use "fdisk -l" on the device to find what partitions exist.
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: [EMAIL PROTECTED]
Subject: an alternate default for LILO
Date: Tue, 29 Feb 2000 07:18:08 GMT
Having gotten no help after explaining what I wanted to do, I proceeded to
try to come up with an idea to accomplish it. I don't have enough background
to do all of this, so I'll be looking for some kind of help from someone who
does.
What I want to do is modify LILO so that it knows of not one default system
to boot, but two. There will be an alternate default system. Perhaps it
can be the 2nd system in the lilo.conf file. When LILO runs to boot up a
system, it will look for this special flag in RAM or maybe in some other
hardware. Exactly where this flag will be and how to detect it is the big
crucial part of this. The flag MUST be something that will be cleared out
if there is a hard reset (pressing the reset button) and obviously if the
power is cycled off and on. The flag MUST NOT be cleared when Linux does
a software reboot (e.g. shutdown -r now). The modified LILO must be able
to clear the flag itself, and will do so when it detects it.
When LILO detects this flag, and no other system is typed in, it will boot
the alternate system, but before doing so, it will clear the flag.
When LILO does not detect this flag, it will boot the primary default system.
Then I will modify the Linux kernel so that it will, when a specific case
exists, leave the flag for LILO when it does a soft reboot. The purpose is
so that I can have Linux reboot to a different OS when I want it to. But
that other OS will not be rebooted a 2nd time without first running the
primary Linux system. The purpose for me is so that Linux can actually
build the system it is about to start up. It will load the raw drive or
partition image of that system from a networked file server, or a CDROM,
and then set the flag and reboot, thus starting up the other system it just
built.
I do not know enough about the real mode state of a PC or Intel machine to
know just what my options might be for leaving this flag. I suspect it will
not be so simple as a 1-bit somewhere. More likely, it could be a long
string of specially coded characters that are very unlikely to happen by
chance. It could be "LILO: please load the alternate system this time put
in some obscure memory location, such as in the last block of the old VGA
video buffer space (but if a soft reboot or the BIOS wipes this out, then
something else will be needed).
Another alternative is if the Linux kernel itself could load the other
system directly and invoke it. Given that the jump to it would be in
protected mode, that could be a problem (systems tend to expect to start
in real mode, right?). OTOH, if some protected mode code can switch back
to real mode before the jump, that just might do it.
The goal is to use Linux to build another system on the fly and boot it up,
and repeat the process (run Linux to build another system and boot it) each
time there is a reboot cycle.
--
| Phil Howard - KA9WGN | for headlines that | Just say no to absurd patents |
| [EMAIL PROTECTED] | really matter: | Boycott Amazon.Com (AMZN) |
| Dallas - Texas - USA | linuxhomepage.com | Shop http://bn.com/ instead |
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: how to get the specific source code?
Date: Tue, 29 Feb 2000 08:19:20 +0100
han jibin wrote:
> =
> Hi,there: my system is Redhat, I want to get the source code of
> "gethostname" to learn some about DNS program, then how to find the cod=
e?
> besides, in general, how to find the specific source code of linux?
> thanks.
If you have purchased the CDs, then the source code of everything is on
the second CD. The linux kernel source code can be installed through the
rpms kernel-souce and kernel-headers (they should be on the first disk)
or through the source rpm kernel-whatever on the second disk.
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
Date: Tue, 29 Feb 2000 09:32:06 +0200
From: Toomas Gavrilin <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux.best
Subject: Re: telnetd stopped working
Steve Berridge wrote:
> Hello group -
> I am running RH 6 on a Dell server and suddenly when I try to telnet to
> the machine I get an error message saying
> "telnetd: /bin/login: No such file or directory "
>
> I have uninstalled telnet and installed a newer version from RH
> (telnet-0.10-29)
>
> Does anyone know what causes this and what the fix is?
> Your help is greatly appreciated.
Well, first, make sure you've got 'login' in directory /bin.
------------------------------
From: "Jae H. Choi" <[EMAIL PROTECTED]>
Subject: I need help setting up my ethernet card...
Date: Tue, 29 Feb 2000 02:51:31 -0500
Hello, I am completely new to Linux at this point...
I just installed my linux using ftp on my notebook computer.. For some
reason, my ethernet card was not supported even when I was using pcmcia.img
to boot.. So i used my friend's ethernet card... but for some reason after
I finished installing linux, I couldn't get connected on line.. Do I have
to download the driver for my ethernet card and put it on the module???
If so what is the process like??
My ethernet card is 3com SH572B with Xjack.. Can anybody please help me??
I really want to use this OS!!!
Thank You
Jae H. Choi
[EMAIL PROTECTED]
------------------------------
** 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
******************************