Linux-Development-Sys Digest #212, Volume #8 Fri, 13 Oct 00 10:13:13 EDT
Contents:
Re: host names resolved from /etc/networks!!! (Paul Kimoto)
pthreads iostream and RedHat 7.0 ("news-server")
Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable Release?
("Emu")
Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release? (Rick Ellis)
Re: sockets per process (Rick Ellis)
Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release? ("Emu")
Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release? (Rick Ellis)
Re: pthreads iostream and RedHat 7.0 (Kaz Kylheku)
Re: include file for printk() ("Anil Prasad")
Re: How to allocate a physical address range ("Anil Prasad")
Re: A new directory hierarchy standard - need opinions (Villy Kruse)
Re: host names resolved from /etc/networks!!! (Villy Kruse)
Re: host names resolved from /etc/networks!!! (Villy Kruse)
Re: utime(touch) gives EPERM - Bug in Linux??? (Villy Kruse)
Re: Most popular Linux development environment(s)? Graphical? (Shannon Hendrix)
Printer status (Aulne)
Re: Determining what CPU is going to execute a thread from a program (Wolfram Faul)
Re: How does a computer boot? (Wolfram Faul)
Keyboard driver for chord-keying? (Holger Isenberg)
JVM crash in RedHat 7 ? (Thierry)
Re: JVM crash in RedHat 7 ? (Paul Flinders)
Fisakars UPS + Linux ("James Morris")
Re: need to get MAC addr (Michel Bardiaux)
Suse 6.4: add_timer linking problem (Jan Mannekens)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: host names resolved from /etc/networks!!!
Date: 12 Oct 2000 23:15:09 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
Thomas Drescher wrote:
(The "system" is the kernel and so this is off topic ...)
> Hosts are not resolved from /etc/hosts! It didn't work at all
> but....It opens the /etc/networks so i put the host names in there
> just for testing!!!
> open("/etc/nsswitch.conf", O_RDONLY) = 4
[...]
> open("/etc/networks", O_RDONLY) = 4
Does your nsswitch.conf file say "networks: files"?
--
Paul Kimoto
This message was originally posted on Usenet in plain text. Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.
------------------------------
From: "news-server" <[EMAIL PROTECTED]>
Subject: pthreads iostream and RedHat 7.0
Date: Fri, 13 Oct 2000 03:15:48 GMT
Hi,
I've just installed RedHat 7.0 and some threaded code I was working on under
6.2 seems to have broken. I tracked the problem down, and there seems to be
a problem using the iostreams (or at least cout) from inside multiple
threads. I'm certain that the iostream library (or
libstdc++ where it lives) is supposed to be reentrant. Is there something
different that needs to be done now at compile or link time? I
tried -DREENTRANT, but no luck. printf in stdio seems to work ok.
I also thought the problem with mutex's RedHat just posted a bug fix for
might be causing this,
but I installed the new libc and no luck.....
Anyone else having this problem or have some idea? I installed Debian 2.2
on another machine, and
my code works fine on it.
To see what I'm talking about, try this on a RedHat 7.0 machine (just sample
code, not what I'm working on!): (compile with -lpthreads and -lstdc++) It
should print "Running" 10 times but it only prints once or not at all.
#include <iostream>
#include <unistd.h>
#include <pthread.h>
using namespace std;
void *Run (void *ptr)
{
cout<<"Running"<<endl;
while (1)
sleep(1000);
}
int main (void)
{
pthread_t theThread;
int i;
for (i=0; i<10; i++)
{
pthread_create(&theThread, NULL, Run, NULL);
}
while(1)
sleep(10000);
}
------------------------------
From: "Emu" <[EMAIL PROTECTED]>
Subject: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release?
Date: Thu, 12 Oct 2000 23:24:19 -0500
Just curious to see if anyone knows approximately when it will be considered
a stable release
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release?
Date: 13 Oct 2000 03:54:51 GMT
In article <8s5v9e$3qq$[EMAIL PROTECTED]>,
Emu <[EMAIL PROTECTED]> wrote:
>Just curious to see if anyone knows approximately when it will be considered
>a stable release
When it's ready.
--
http://www.borgchat.net/linux
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: sockets per process
Date: 13 Oct 2000 03:52:50 GMT
In article <[EMAIL PROTECTED]>,
Eclipse mail <[EMAIL PROTECTED]> wrote:
>i have realized that we can have only 255 file descriptors open per
>process ( including sockets).
That's not true. I just can a quick test (kernel=2.2.16) and got
1024.
--
http://eeek.borgchat.net/linux
------------------------------
From: "Emu" <[EMAIL PROTECTED]>
Subject: Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release?
Date: Fri, 13 Oct 2000 00:25:42 -0500
Thanks for the informative reply :)
"Rick Ellis" <[EMAIL PROTECTED]> wrote in message
news:8s612b$hpi$[EMAIL PROTECTED]...
> In article <8s5v9e$3qq$[EMAIL PROTECTED]>,
> Emu <[EMAIL PROTECTED]> wrote:
>
> >Just curious to see if anyone knows approximately when it will be
considered
> >a stable release
>
> When it's ready.
>
> --
> http://www.borgchat.net/linux
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Question About Kernel 2.4.0 Beta's, When Do You Think It will be a Stable
Release?
Date: 13 Oct 2000 04:33:43 GMT
In article <8s62so$216$[EMAIL PROTECTED]>,
Emu <[EMAIL PROTECTED]> wrote:
>Thanks for the informative reply :)
You don't like my answer? It's the official one. It'll be released
when it is ready to be released and not before. There is no schedule.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: pthreads iostream and RedHat 7.0
Reply-To: [EMAIL PROTECTED]
Date: Fri, 13 Oct 2000 05:07:45 GMT
On Fri, 13 Oct 2000 03:15:48 GMT, news-server <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I've just installed RedHat 7.0 and some threaded code I was working on under
>6.2 seems to have broken. I tracked the problem down, and there seems to be
>a problem using the iostreams (or at least cout) from inside multiple
>threads.
No kidding! What piece of documentation led you to believe that you can use a
C++ stream from multiple threads? If it's not documented as safe, you cannot
assume that it is.
> I'm certain that the iostream library (or
>libstdc++ where it lives) is supposed to be reentrant.
I don't know of any document that requires any part of the C++ library
to be thread safe, never mind reentrant.
POSIX requires <stdio.h> streams to be thread safe. This creates a pressure on
the implementors to make the streams safe. Unfortunately, POSIX says nothing
about C++. If you want to use POSIX threads, you should also consider
using POSIX streams.
If you must use iostreams, is wrap your own mutex around each stream. Better
yet, put one big global mutex around all the stream operations, including
construction and destruction, even if they are on distinct stream objects. The
implementation of streams may use global variables, such as perhaps global
linked list that tracks all the existing streams. (Does C++ have anything like
a ``flush all streams'' operation? It would need a list to make that work).
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
From: "Anil Prasad" <[EMAIL PROTECTED]>
Subject: Re: include file for printk()
Date: 13 Oct 2000 05:27:21 GMT
it should be linux/kernel.h
> I guess you have to include linux/module.h
>
> Vivek
>
> Zhihui Zhang wrote:
> >
> > When I compile a kernel module, it says:
> >
> > warning: implicit declaration of function 'printk_R1b7d4074"
> >
> > I guess I need to include some header file for this or what? Thanks
for
> > your help.
> >
> > -Zhihui
>
>
>
------------------------------
From: "Anil Prasad" <[EMAIL PROTECTED]>
Subject: Re: How to allocate a physical address range
Date: 13 Oct 2000 05:32:02 GMT
> Does anyone know how to allocate a physical address range to map the
> registers on a PCI card?
i think ioremap will be useful.
void *pointer;
pointer = ioremap(starting address of resource, length);
now this pointer can be used to do any input/output.
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Crossposted-To: comp.os.linux.admin,comp.os.linux.networking,comp.os.linux.setup
Subject: Re: A new directory hierarchy standard - need opinions
Date: 13 Oct 2000 06:44:42 GMT
On 13 Oct 2000 01:05:33 GMT, Todd Knarr <[EMAIL PROTECTED]> wrote:
>
>That's one I haven't seen. All the /opt systems I've run into use
>directories of the form /opt/{package}/..., often including bin, lib
>and include directories for the package. I've never run into one with
>/opt/bin on it's own. Then again, I don't work with Sun much which may
>explain that.
>
Anyone seen the SCO Open Server 5. Everything in the /opt directory,
and the traditional locations replaced by symlinks. A real mess, if
you'd ask me. Of course, the /opt/{package}/... is a neat way to
isolate the name spaces so you can't get name conflict. Sun suplied
packages with have the prefix SUN and SCO supplied packages would have
the prefix SCO, and so on, which is fine if you take a package in
isolation. However it is not convinient if all the executables are
scattered all over the place, and ditto for the include files needed
for compiling.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: host names resolved from /etc/networks!!!
Date: 13 Oct 2000 06:47:48 GMT
On Thu, 12 Oct 2000 20:25:10 GMT, Rudi Sluijtman <[EMAIL PROTECTED]> wrote:
>Are you sure it is not in your "strace route" output ?
>in /etc/host.conf (man 5 host.conf) the first line should be:
>order hosts, bind
>which tells the resolver to first have a look in the /etc/hosts file.
>
If we haven't found out by now. The function of /etc/host.conf is now
replaced by /etc/nsswitch.conf.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: host names resolved from /etc/networks!!!
Date: 13 Oct 2000 06:53:08 GMT
On Thu, 12 Oct 2000 20:22:01 GMT, Thomas Drescher <[EMAIL PROTECTED]> wrote:
># strace route dump follows....
>open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such f...
>open("/etc/ld.so.cache", O_RDONLY) = 3
>open("/lib/libc.so.6", O_RDONLY) = 3
>open("/proc/net/route", O_RDONLY) = 3
>write(1, "Kernel IP routing table\n", 24) = 24
>write(1, "Destination Gateway "..., 78) = 78
>open("/etc/nsswitch.conf", O_RDONLY) = 4
>open("/etc/ld.so.cache", O_RDONLY) = 4
>open("/lib/libnss_files.so.2", O_RDONLY) = 4
>open("/etc/resolv.conf", O_RDONLY) = 4
>open("/etc/networks", O_RDONLY) = 4
>write(1, "isdn-gw-2 * "..., 78) = 78
>open("/etc/networks", O_RDONLY) = 4
>write(1, "hst1.thomas.net * "..., 78) = 78
>open("/etc/networks", O_RDONLY) = 4
>write(1, "hst2.thomas.net * "..., 78) = 78
>open("/etc/networks", O_RDONLY) = 4
>write(1, "isdn-gw-1 * "..., 78) = 78
>open("/etc/networks", O_RDONLY) = 4
>write(1, "loopback * "..., 75) = 75
>write(1, "default isdn-gw-1 "..., 78) = 78
>
To mee this looks like running the route command and the names
displayed are the names associated with network addresses, which
correctly is looked up in /etc/networks.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: utime(touch) gives EPERM - Bug in Linux???
Date: 13 Oct 2000 06:56:57 GMT
On 12 Oct 2000 20:07:48 +0100, Nix <$}xinix{[email protected]> wrote:
>[EMAIL PROTECTED] (Villy Kruse) writes:
>
>> Whether that is mandated by POSIX or other standard I have no idea.
>> Somone have the POSIX text available (or unix98)?
>
>Unix98 states, for utime():
>
>,----[ EPERM ]
>| The times argument is not a null pointer and the calling
>| process' effective user ID has write access to the file but
>| does not match the owner of the file and the calling process
>| does not have the appropriate privileges.
>`----
>
>(`The appropriate privileges' being `root, or CAP_FOWNER' on Linux.)
>
Thanks, and now hopefully the POSIX doesn't say something different.
Villy
------------------------------
From: [EMAIL PROTECTED] (Shannon Hendrix)
Subject: Re: Most popular Linux development environment(s)? Graphical?
Date: 12 Oct 2000 17:35:39 -0400
In article <[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
> The problem comes in that while this may get you a reasonably slick
> way of having K001 buttons that can run "make" for you, this doesn't
> necessarily buy you a common GUI programming API.
That is one reason I don't like Linux/UNIX IDE's. When I used one on
a Mac, it was like part of the system. Same for using one tied
specifically to a GUI API on UNIX. Windows never feels right, period.
> This all mean that apps should be implemented in Model/View/Controller
> manner, where the GUI is kept as a separate component in the application,
I have heard of this before, but have never seen a reference to it
outside of conversation or Usenet. Are there good books on this?
Maybe it's known by other names and I'm just missing the connection.
--
[EMAIL PROTECTED] _________________________________________________
______________________/ armchairrocketscientistgraffitiexenstentialist
"The determined programmer can write a FORTRAN program in any
language."
------------------------------
From: Aulne <[EMAIL PROTECTED]>
Subject: Printer status
Date: Fri, 13 Oct 2000 08:35:41 GMT
Hello all,
I am printing locally. I would like to get the printer's status so that I
can report errors such as "no paper" or "paper jam", etc... I'm sending
files through lpr. I looked at lpc, lpq and lprm, which works fine, but only
seems to report errors about print spooling. In order words, I think I would
have to maintain a timeout value and if the file's still in the spooler after
such time, then there's an error.
Is there a way to get the printer err msgs?
Alain
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Wolfram Faul <[EMAIL PROTECTED]>
Subject: Re: Determining what CPU is going to execute a thread from a program
Date: Fri, 13 Oct 2000 11:02:01 +0200
Hi all,
Miguel Angel Rodriguez Jodar wrote:
> Is possible to indicate to the kernel which CPU, in a multiprocessor system,
> must accept a thread we want to launch using fork(), clone() or
> phread_create() or whatever?
> Does exist a system call that can return us the number of active CPU's in a
> system?
Yes there is a possibility but I haven't tested it. And perhaps it's a
bit outdated but it sounds good.
http://isunix.it.ilstu.edu/~thockin/pset/
Wolfram
------------------------------
From: Wolfram Faul <[EMAIL PROTECTED]>
Subject: Re: How does a computer boot?
Date: Fri, 13 Oct 2000 11:06:55 +0200
Hi,
> Please post me solutions, advices, book titles, links for sites...
> Everything could help me.
>
In the O'Reilly Book "Device Drivers", sorry I forgot the authors name,
is small chapter about booting the linux kernel.
Wolfram
------------------------------
From: Holger Isenberg <[EMAIL PROTECTED]>
Subject: Keyboard driver for chord-keying?
Date: 13 Oct 2000 09:20:03 GMT
Is there a keyboard driver for normal PS/2 keyboards for
chord-keying like with the Twiddler (www.twiddler.com)?
The function is like this: You press 2 or 3 keys together and when releasing
them, the chorded key is registered like a keypress event.
I have heard that a driver like this exists, but do not know where to find it.
--
Holger Isenberg
[EMAIL PROTECTED]
http://mars-news.de
------------------------------
From: Thierry <[EMAIL PROTECTED]>
Subject: JVM crash in RedHat 7 ?
Date: Fri, 13 Oct 2000 09:46:35 +0000
Hi,
I am unable to run java and javac on RedHat 7, i am using the jdk1.2.2 from
sun.
I have Segmentation Fault error.
Have you an idea ?
PS : it works with mandrake 7.1.
Thanks a lot.
thierry
------------------------------
From: Paul Flinders <[EMAIL PROTECTED]>
Subject: Re: JVM crash in RedHat 7 ?
Date: 13 Oct 2000 11:05:05 +0100
Thierry <[EMAIL PROTECTED]> writes:
> Hi,
>
> I am unable to run java and javac on RedHat 7, i am using the jdk1.2.2 from
> sun.
>
> I have Segmentation Fault error.
>
> Have you an idea ?
Grab the updated glibc from the RedHat site - I believe that it fixes this problem
------------------------------
From: "James Morris" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Fisakars UPS + Linux
Date: Fri, 13 Oct 2000 12:30:01 +0100
Hi,
I've just installed a nice big Fiskars UPS on our home network. We're
running Redhat 6.2 as our proxy and I want to hook the ups to it so it will
shut down gracefully when the power goes (80 gigs and ext2 = a long time of
fsck).
Does anyone know of any Linux Fiskars compatible UPS programs ?
Cheers,
James
------------------------------
From: Michel Bardiaux <[EMAIL PROTECTED]>
Subject: Re: need to get MAC addr
Date: Fri, 13 Oct 2000 12:54:59 GMT
Jeremy Savoy wrote:
>
> I need to get the MAC address of eth0 in a program. I think using ioctl
> would be a way to do this, but the man page doesn't give me much help on
> how to use it to get SIOCGHWADDR . Could someone maybe give me an example
> or tell me where I can look for more documentation on this?? Thanks
>
> Jeremy Savoy
> Linux R&D
> IBM - Retail Store Solutions
> [EMAIL PROTECTED]
In the source for ifconfig
--
Michel Bardiaux
Peaktime Belgium S.A. Rue Margot, 37 B-1457 Nil St Vincent
Tel : +32 10 65.44.15 Fax : +32 10 65.44.10
------------------------------
From: Jan Mannekens <[EMAIL PROTECTED]>
Subject: Suse 6.4: add_timer linking problem
Date: Fri, 13 Oct 2000 15:18:43 +0200
Hi all,
Does anybody has an idea which library I have to include to prevent the
following linking error:
undefined reference to `add_timer'
(with add_timer used as declared in linux/timer.h)
I use Suse Linux 6.4.
Thanks in advance,
Jan Mannekens
------------------------------
** 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
******************************