Linux-Development-Sys Digest #190, Volume #8 Wed, 4 Oct 00 10:13:12 EDT
Contents:
Re: How to load shared libs at runtime? (Victor Wagner)
Re: Linux Stack Sizes? (0/1) (MeekGeek)
Re: Linux partition question? ("E-mu")
(subject: mips libc & no fpu) (jauming)
patch file (Bo - Sun)
Re: [How to kill process which use device-file??] (Bomshik Kim)
SAN/FibreChannel installations ("Dr. Armin Wittmann")
Re: PCI Documentation (Arne Driescher)
Re: how to "send a signal" from kernel to user process? ("Z")
Re: [How to kill process which use device-file??] (Qing Liu)
cscope ("St. Otto")
Re: Linux partition question? ("James T. Dennis")
Re: patch file ("James T. Dennis")
Re: cscope (Josef Moellers)
Re: cscope (Michel Dagenais)
How SMP works in Linux ("???")
Re: Text-based user interface development (Thomas Dickey)
Re: Ensuring graceful treatment of mem shortage (Bernd Strieder)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Victor Wagner)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to load shared libs at runtime?
Date: 4 Oct 2000 00:44:56 +0400
Peter Koch <[EMAIL PROTECTED]> wrote:
: Thanks, but there are no "man" pages available for these functions (I'm
Than you forget to install it.
It is in manpages-dev package or something like this.
: using SuSE 7.0). I found the necessary declarators in /usr/include/dlfcn.h
: meanwhile however and think I can work with this. Seems the tricky part of
: linux development is getting used to poor documentation.
No, tricky part is to learn how to administer your system or hire
somebody to do it for you, so all the stuff you have to read was on the
place.
Sincerely, I'm using Linux for five years, and each time I'm upgrading
to new version of distribution, I have to keep distribution at hand for
week or more and try to do as many different things as possible to be
sure that everything is on the place.
--
The prayer of serenity applies here. To both of us. :-)
-- Larry Wall in <[EMAIL PROTECTED]>
------------------------------
From: MeekGeek <[EMAIL PROTECTED]>
Subject: Re: Linux Stack Sizes? (0/1)
Date: Wed, 04 Oct 2000 04:01:28 GMT
On 02 Oct 2000 14:21:12 -0400, "Paul D. Smith"
<[EMAIL PROTECTED]> wrote:
>%% MeekGeek <[EMAIL PROTECTED]> writes:
>
> m> Incidentally, I could not find an implementation of alloca in the GCC
> m> 2.95.2 source code that did not use dynamic allocation from the heap
> m> for the memory, using malloc! I'm presuming that I haven't found the
> m> right source file, but all of the implementations I found, including
> m> inside alloca.c, use malloc for the memory.
>
>Yes, you've not found the right one.
>
>The compiler itself (GCC) uses alloca() in its implementation. The
>alloca() you've found in alloca.c is the one that is used in GCC if you
>compile it with a compiler that doesn't support alloca(), so you can get
>a working GCC (then, I suppose, you could recompile GCC with itself and
>it would use the builtin alloca()).
>
>If you go look at _most_ GNU programs, they come with this same alloca.c
>to allow them to be built on systems where alloca() isn't available.
>The "configure" script checks for a system[*] alloca() and, if it doesn't
>exist, compiles and links alloca.c into the resulting program.
>
>
>[*] Either libc or compiler alloca().
Right, understood. That's good, except it blows the idea of me
checking the source to see how they do it. :-) (I'm not going to
analyze the *compiler* source for that -- that's past the point of
diminishing returns -- I have enough info from your help to code it
now.)
And by the way, it's all working now...
Thanks all.
------------------------------
From: "E-mu" <[EMAIL PROTECTED]>
Subject: Re: Linux partition question?
Date: 04 Oct 2000 04:07:34 GMT
Sorry, here are prinouts generated from cfdisk and fdisk respectivley. Note
that CFDISK does not make note of /dev/hda3. Why does Linux FDISK see this
as a 'Win95 Ext'd (LBA)' ? Partition Magic just sees it as just an
Extended Primary Partition. I was told that the ID should be '5' and not
'f' and that I would not be able to install or run linux the way I have my
partitions set up right now? Well I am running both linux and windows 98SE
just fine under a dual boot system :)
CFDISK
Name Flags Part Type FS Type [Label]
Size(MB)
============================================================================
--
hda1 Primary Linux ext2
[/boot] 23.23
hda2 Boot Primary Win95 FAT32(LBA)
14004.27
hda5 Logical Win95 FAT32
526.42
hda6 Logical Linux swap
270.96
hda7 Logical Linux ext2 [/]
5179.03
FDISK
Device Boot Start End Blocks Id System
/dev/hda1 1 3 22648+ 83 Linux
/dev/hda2 * 4 1812 13676040 c Win95 FAT32
(LBA)
/dev/hda3 1813 2584 5836320 f Win95 Ext'd
(LBA) <<<<<<< This is suppose to be ID 5, Linux Exten. Prim.
/dev/hda5 1813 1880 514048+ b Win95 FAT32
/dev/hda6 1881 1915 264568+ 82 Linux swap
/dev/hda7 1916 2584 5057608+ 83 Linux
------------------------------
From: jauming <[EMAIL PROTECTED]>
Subject: (subject: mips libc & no fpu)
Date: Wed, 04 Oct 2000 04:18:40 GMT
(subject: mips libc & no fpu)
dear all,
there are "int __fpc_csr" & "double __fpregs[6]" in struct __jmp_buf[1]
in sysdeps/mips/jmp_buf.h
(glibc-2.0.7)
if the mips cpu has no fpu, can i just simply remove those 2 fpu regs
from struct __jmp_buf[1]?
thanks in advanced!:)
--
--
regards
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Bo - Sun <[EMAIL PROTECTED]>
Subject: patch file
Date: Wed, 4 Oct 2000 00:00:36 -0500
hi:
can somebody tell me what is patch file of a linux file system, what is
its structure?
thanks,
Bo
------------------------------
From: Bomshik Kim <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: [How to kill process which use device-file??]
Date: Wed, 4 Oct 2000 15:44:05 +0900
Thank you for reply.
Could you tell me where I can find the source code of fuser.
Because, I want to know how fuser works.
and I do not want to call "the shell command 'fuser'" in my program.
how does 'fuser' know the process which hold /dev/dsp?????
Regard.
On 28 Sep 2000, Qing Liu wrote:
> Bomshik Kim <[EMAIL PROTECTED]> writes:
>
> > When we listen to music from XMMS(or x11amp),
> > one of XMMS processes(about 3~4 processes) occupies the device file
> > /dev/dsp.
> >
> > But, When some other application( let's call it alpha ) wants to
> > use /dev/dsp and XMMS plays mp3-music already,
> > then since /dev/dsp is occupied by XMMS, alpha can't open /dev/dsp.
> > because two processes can't share /dev/dsp.
>
> What about fuser -k /dev/dsp ?
>
> --
> Liu
>
>
------------------------------
From: "Dr. Armin Wittmann" <[EMAIL PROTECTED]>
Subject: SAN/FibreChannel installations
Date: Wed, 04 Oct 2000 06:52:22 GMT
Hi
I am about to evaluate a new server installation
for our high performance and high availability
environment.
Appropirate would be a SAN installation for
our storage server and the attached
server farm (many Linux server) used
as webserver, e-mail server etc.
It is very hard to get information about
support for Linux systems.
Specifically driver support for FibreChannel
adapters is needed.
If anybody can share with me some information,
experience or forward some links on this topic
I would appreciate very much.
Thanks
Armin
------------------------------
From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: PCI Documentation
Date: Wed, 04 Oct 2000 09:05:57 +0200
Mark McDougall wrote:
>
> [EMAIL PROTECTED] wrote:
>
> > I am writing a pci driver to interface with a home-grown pci
> > peripheral. I already have Linux Device Drivers by Alessandro Rubini,
> > first edition. Does anyone know of any other documentation concerning
> > pci drivers and pci peripherals.
>
> What exactly are you having a problem with?
>
> There's not much to concern yourself about with pci devices other than
> determining the resource allocations. Apart from that, once you've
> mapped any memory and/or I/O space you're talking to a "device" -
> whether it's PCI, ISA or something else is not relevant!?!
For most drivers you are right. PCI is really painless.
However, there is hardly any documentation for bus master devices.
What exactly is the PCI-latency register usefull for? Am I free to
set it to any value if can think of? What happens
if a DMA transfer is interrupted by bus arbitration of an other devices.
I haven't found any documentation about this problems.
So, if anybody knows a good source for this .....
-Arne
------------------------------
From: "Z" <[EMAIL PROTECTED]>
Subject: Re: how to "send a signal" from kernel to user process?
Date: Wed, 04 Oct 2000 09:10:15 +0200
Once upon a while "Duke Lee" <[EMAIL PROTECTED]> wrote:
> I wrote a network driver as a kernel module. The driver needs to wake up
> the user process whenever it receives a packet. To do this, I have been
> using /proc file system. I have helper processes that polls on a /proc file
> and sends signal to the user process.
>
> I am wondering if there a way to "send signals" (SIGUSR1 nad SIGUSR2) to the
> user process directly from the kernel module if I have the pid of the user
> process? The term "sending signal" might not make sense since I am
> suspecting that it might be as simple as scheduling the user process with
> some parameters. I don't quite understand.
>
> I have been looking at the source for few days and I am really confused.
> Please help!
>
> duke
>
>
>
The usual way to do what you want is to implement the select
interface of your driver. The user process will call select(2)
or poll(2) to wait for the signal you intend to send.
Which is no IPC signal itself but simply the return form
select/poll.
If you need your program to stay running while waiting for
the driver you should call select with timout or put your
select call into an extra thread.
Z
--
LISP is worth learning for the profound enlightenment experience you
will have when you finally get it; that experience will make you a
better programmer for the rest of your days. Eric S. Raymond
------------------------------
From: Qing Liu <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: [How to kill process which use device-file??]
Date: 04 Oct 2000 09:59:49 +0200
Bomshik Kim <[EMAIL PROTECTED]> writes:
> Thank you for reply.
>
> Could you tell me where I can find the source code of fuser.
In psmisc package ==> ftp://metalab.unc.edu/pub/Linux/system/status/ps/
--
Liu
------------------------------
From: "St. Otto" <[EMAIL PROTECTED]>
Subject: cscope
Date: Wed, 04 Oct 2000 10:12:32 +0200
Hello again !
Is there anywhere a tool like "cscope" (->Solaris)
under linux (Suse) available ?
Who can help ?
Regards, Steffen
------------------------------
From: "James T. Dennis" <[EMAIL PROTECTED]>
Subject: Re: Linux partition question?
Date: 4 Oct 2000 08:52:16 GMT
E-mu <[EMAIL PROTECTED]> wrote:
> Sorry, here are prinouts generated from cfdisk and fdisk respectivley. Note
> that CFDISK does not make note of /dev/hda3. Why does Linux FDISK see this
> as a 'Win95 Ext'd (LBA)' ? Partition Magic just sees it as just an
> Extended Primary Partition. I was told that the ID should be '5' and not
> 'f' and that I would not be able to install or run linux the way I have my
> partitions set up right now? Well I am running both linux and windows 98SE
> just fine under a dual boot system :)
> CFDISK
Basically useless. Use fdisk or sfdisk.
> Name Flags Part Type FS Type [Label]
> Size(MB)
> -------------------------------------------------------------------
> hda1 Primary Linux ext2 [/boot] 23.23
> hda2 Boot Primary Win95 FAT32(LBA) 14004.27
> hda5 Logical Win95 FAT32 526.42
> hda6 Logical Linux swap 270.96
> hda7 Logical Linux ext2 [/] 5179.03
> FDISK
> Device Boot Start End Blocks Id System
> /dev/hda1 1 3 22648+ 83 Linux
> /dev/hda2 * 4 1812 13676040 c Win95 FAT32
> (LBA)
> /dev/hda3 1813 2584 5836320 f Win95 Ext'd
> (LBA) <<<<<<< This is suppose to be ID 5, Linux Exten. Prim.
Actually /dev/hda3 can be any sort of extended partition as
far as Linux is concerned.
> /dev/hda5 1813 1880 514048+ b Win95 FAT32
> /dev/hda6 1881 1915 264568+ 82 Linux swap
> /dev/hda7 1916 2584 5057608+ 83 Linux
As I suspected. This is a perfectly normal partition table with
a minor quirk: the extended partition is marked as type f (Win'95
extended) rather than type 5 (normal/DOS extended) or 85 (Linux
extended). That quirk is of no operational consequence to Linux.
------------------------------
From: "James T. Dennis" <[EMAIL PROTECTED]>
Subject: Re: patch file
Date: 4 Oct 2000 08:56:17 GMT
Bo - Sun <[EMAIL PROTECTED]> wrote:
> hi:
> can somebody tell me what is patch file of a linux file system, what is
> its structure?
> thanks,
> Bo
A Linux patch file is usually simply a text file generated by the
diff command which describes the changes between two versions of
a set of kernel or other source files. Read the diff command
and it's source code for details about that format.
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: cscope
Date: Wed, 04 Oct 2000 11:41:30 +0200
"St. Otto" wrote:
> =
> Hello again !
> =
> Is there anywhere a tool like "cscope" (->Solaris)
> under linux (Suse) available ?
> Who can help ?
You can download it from http://cscope.sourceforge.net/.
It seems to have some problems, though, because sometimes it doesn't
find all definitions or it will show some noise in the main window.
YMMV,
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
------------------------------
Subject: Re: cscope
From: Michel Dagenais <[EMAIL PROTECTED]>
Date: Wed, 04 Oct 2000 13:16:37 GMT
> > Is there anywhere a tool like "cscope" (->Solaris)
> > under linux (Suse) available ?
> > Who can help ?
>
> You can download it from http://cscope.sourceforge.net/.
> It seems to have some problems, though, because sometimes it doesn't
> find all definitions or it will show some noise in the main window.
> YMMV,
Source navigator is another recently "open sourced" alternative
(sources.redhat.com).
------------------------------
From: "???" <[EMAIL PROTECTED]>
Subject: How SMP works in Linux
Date: Wed, 4 Oct 2000 22:19:30 +0900
Isn't there any FAQ?
my question is:
Q1: What happens when one of two cpu dies in SMP kernel ?
Q2: When one CPU is processing kernel code, can the other CPU process
application code ?
Q3: TUX, a web server which runs in kernel mode, can be accelarated by
multi-CPU ?
------------------------------
From: Thomas Dickey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Re: Text-based user interface development
Date: 4 Oct 2000 13:18:25 GMT
In comp.os.linux.development.apps Grant Edwards <[EMAIL PROTECTED]> wrote:
> In article <8rd4lv$som$[EMAIL PROTECTED]>, Thomas Dickey wrote:
> somebody else was going to take over working my changes, but
> after looking back through my e-mail I guess I didn't. The
> snapshot of where I left off is at
> ftp://ftp.visi.com/users/grante/stuff/cdk.tar.gz
thanks - got a copy
> I'd only fixed up about 1/3 of the widgets to work with the
> screen traversal engine, and there were some other minor things
> left to finish.
well, it's a starting point, so I can see just what you had in mind.
> Back in January somebody said he wanted to continue work on
> it and get it folded back into the CDK distro. I guess it
> didn't happen. At the time (late January), my work was based on
> 4.9.8 and the current version was 4.9.9. If you want to
> enquire further, let me know, and I'll send you they guy's
> e-mail address (I don't like posting other people's e-mail
> addresses to Usenet).
would be nice (I've been talking to some other people, too). I saw the
news posting, but don't recall seeing a followup.
>>> 2) A package that used to be from Borland that provides a
>>> whole text-mode application framework (menus, windows,
>>> data-entry, various widgets, etc.).
>>but it's specific to the console (uses too many special
>>characters to port well)
> Ah, yes. I couldn't remember why I decided it wouldn't work for
> my app. That was it
it could be made more portable, but each time I've seen a newer version
it's been suffering from featuritis (using the latest compiler features
without regard to portability).
> Yea, that's the big problem with newt. If you can find an
> example that's close enough to what you want to do, it's not
> too hard to figure things out, but the docs haven't been
> updated in a loooong time (IIRC they don't cover any of the
> geometry management stuff).
yes - when I get into read-the-code mode, I find too many things that
need to be fixed to bother with (none of these packages seem to have
a full-time maintainer).
> I must say the documentaion for CDK was pretty well done.
it could be better. (In my most recent version, I cleaned up the organization
of the manpages to make them easier to read; the next time I go that way, I'll
continue on that part).
--
Thomas E. Dickey <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com
------------------------------
From: Bernd Strieder <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Ensuring graceful treatment of mem shortage
Date: Wed, 04 Oct 2000 16:04:23 +0200
Keith Brown wrote:
>
> What "memory overcommitment feature"? I never heard of this, and I can't see
> why the system would allocate memory to a process that isn't available. I'd
> like to see some references or more details on this.
>
This feature (at least in kernel 2.2) is controlled via the file
/proc/sys/vm/overcommit_memory. If you turn it on, then the kernel does
not immediately reserve big chunks of memory you allocate, probably by
mmap via a malloc call. A certain range of addresses is reserved but not
the memory itself. The memory is assigned page per page to the addresses
as the app uses them. What makes this bad, that you can allocate more
memory than there is in the system, in the hope that no problems come
up, since not all the memory allocated is actually used. The SIGSEGV
happens when an app accesses an address without memory assigned to,
which Linux tries to find then. If that fails, it has to wait for free
memory pages or to raise SIGSEGV. AFAIK SIGSEGV happens currently. And
this happens to every app, even those where memory allocation errors are
treated according to best practices.
That feature has a benefit for systems with apps that allocate a lot of
memory at once without using it fully, which in turn makes it easier for
the sloppy programmer to get their apps working on not too loaded
systems. You buy instability on loaded systems. At least it is turned
off by default.
Bernd Strieder
------------------------------
** 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
******************************