Linux-Development-Sys Digest #724, Volume #8 Wed, 16 May 01 12:13:13 EDT
Contents:
Re: X windows (Chuck Dillon)
Re: Path to kernel include directory? (Rene Herman)
myst. IDE Log-entry (Fred Staudt)
Re: Free OS ? (Grant Edwards)
Re: transpareny ("Darren LS")
Re: Path to kernel include directory? (Grant Edwards)
Re: Generic SCSI driver (Grant Edwards)
Re: Formulating Compatibility Signature: (Adam Shapira)
Re: Path to kernel include directory? (Rene Herman)
Re: X windows ("Darren LS")
Re: Formulating Compatibility Signature: (Rene Herman)
Re: X windows ("Darren LS")
Re: X windows ("Darren LS")
Re: passing messages to a forked thread ("Darren LS")
Re: SIGSEGV is not blocking (Vishnu Vardhan C K)
Re: Will Linux recognize >4GB RAM on Pentium-III Xeon? (Ian D Romanick)
Re: Will Linux recognize >4GB RAM on Pentium-III Xeon? (Stefaan A Eeckels)
Re: Can I use aio_read() for UDP sockets? (Ian D Romanick)
----------------------------------------------------------------------------
From: Chuck Dillon <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,linux.redhat.devel,linux.redhat.development
Subject: Re: X windows
Date: Wed, 16 May 2001 09:10:03 -0500
Darren LS wrote:
>
> Hi all. Can anyone point me toward a decent tutorial to X windows
> programming?
>
> Thank you most kindly
>
> Darren
I suggest you direct yourself to comp.windows.x and its friends
comp.windows.x.*. I also suggest you browse Ken Lee's page which
contains lots of articles including tutorials I believe. It's at
http://www.rahul.net/kenton/xsites.framed.html
HTH,
-- ced
--
Chuck Dillon
Senior Software Engineer
Genetics Computer Group, a subsidiary of Pharmacopeia, Inc.
------------------------------
From: Rene Herman <[EMAIL PROTECTED]>
Subject: Re: Path to kernel include directory?
Date: Wed, 16 May 2001 16:26:14 +0200
Grant Edwards wrote:
> However my driver includes /usr/src/linux/net/tcp.h.
[ snip ]
> Why are the kernel header files from net/scsi not made visible in
> a standard way?
Because glibc provides its own net and scsi headers. User mode code
should never include kernel headers directly anyway. If I am not
mistaken, back in the libc5 days, /usr/include/{net,sci} *were*
symlinks into the kernel tree.
Driver code should most certainly *not* rely on the glibc headers (not
to mention the fact that my version of glibc doesn't even seem to be
providing tcp.h). Really, I believe you should dump your source into
the kernel tree (ie, the one that's installed from the kernel-source
package) and integrate it into the regular kernel build proces. Of
course, this has the added advantage that when and if you decide that
your driver would make a worthy addition to Linux, it will simply be a
matter of submitting the patch. As far as I am aware (admittedly not
very far) 3rd party drivers are *always* distributed as kernel patches,
so again, I believe you should really want to do this.
Rene.
------------------------------
From: Fred Staudt <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: myst. IDE Log-entry
Date: Wed, 16 May 2001 16:40:27 +0200
hi,
we have some myst. entry in /var/log/messages
which repeated 10 to 15 times per month.
it looks like:
May 16 15:09:17 ih2000 kernel: hda: drive not ready for command
May 16 15:09:17 ih2000 kernel: ide0: reset timed-out, status=0x80
May 16 15:09:17 ih2000 kernel: hda: status timeout: status=0x80 { Busy }
May 16 15:09:17 ih2000 kernel: hda: drive not ready for command
May 16 15:09:17 ih2000 kernel: ide0: reset: success
is this a problem from IDE controller or a problem oh harddisk.
best regards
Fred Staudt
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Free OS ?
Date: Wed, 16 May 2001 14:45:50 GMT
In article <[EMAIL PROTECTED]>, Joe Pfeiffer wrote:
>If you're stuck with a 56K modem, it's probably a really good idea to
>buy a CD distribution, and then keep up with upgrades. Downloading a
>half a GB or so takes a long, long time....
You can get cheap CDs (with no support) from various places 1-2 USD for a CD
plus shipping. www.cheapbytes.com is one place I've bought from.
Or you can buy an "offical" CD from RH or somebody else and get support and
other services for 50-200 USD).
--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
visi.com
------------------------------
From: "Darren LS" <[EMAIL PROTECTED]>
Crossposted-To:
alt.linux,comp.os.linux.development.apps,linux.redhat.devel,linux.redhat.development
Subject: Re: transpareny
Date: Wed, 16 May 2001 15:43:01 +0100
Kasper Dupont <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Darren LS wrote:
> >
> > Lew Pitcher <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > On Sat, 12 May 2001 02:19:31 +0100, in alt.linux, "Darren LS"
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > > >hi all I have a lovely little socket program that talks to a server
> > > >blahdebla
> > > >sadly when I run it it steals all the runtime of the tty node, I can
run
> > it
> > > >in the background with the suffix of the & character but I would
rather
> > it
> > > >run in the background automatically. does anyone know if this is
> > possible?
> > > >either via the system or programmatically?
> > >
> > > Yup, it's possible.
> > >
> > > You'll need to execute a piece of code that fork()s a child process
and
> > > terminates the parent process. Something like...
> > >
> > > void daemonize(void)
> > > {
> > > switch(fork())
> > > {
> > > case -1: /* fork failed */
> > > fprintf(stderr,"cant fork\n");
> > > exit(1);
> > >
> > > case 0: /* fork succeeded, in child */
> > > /* should do things like
> > > - redirect stdin/stdout/stderr to bitbucket
> > > - reset all signal handlers
> > > - make process into group leader
> > > ** at this point. */
> > > return;
> > >
> > > default: /* fork succeeded, in parent */
> > > fprintf(stderr,"Daemonized\n");
> > > exit(0);
> > > }
> > > }
> >
> > cool so how do I do this bitbucket redirection thing ?
>
> It doesn't do redirection it only sends the
> process in the background like the & char
> from the shell would do.
>
> Redirection like using < or > from the shell
> can be done as well. You can do that using
> some combination of the open() dup2() and
> close() syscalls. You can do that either
> before or after going in the background, I
> suggest to do it before going in the
> background then you can print an error
> message to stderr if it doesn't work. What
> exactly do you want to do?
>
> Perhaps this example is can be used:
>
> void daemonize()
> {
> int fd=open("/dev/null",O_RDWR);
> if (fd==-1) {
> perror("/dev/null");
> exit(1);
> }
> fflush(); /* With this fflush there is less
> * chance of confusing stdio with
> * the dup2() and fork() calls.
> */
> dup2(fd,0);
> dup2(fd,1);
> dup2(fd,2);
> if(fd>2) close(fd);
> switch(fork()) {
> /* fork() makes a new copy of the process
> * the parent terminates the child continues.
> */
> case 0: break;
> case -1: perror("fork"); exit(1);
> default: _exit(0);
> }
> setsid(); /* setsid() disconnects from the
> * controling terminal.
> */
> }
>
> --
> Kasper Dupont
Hi Kasper, thanks but what I would like to do is dump the output to a vacant
tty terminal for debugging purposes
Darren
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Path to kernel include directory?
Date: Wed, 16 May 2001 14:58:02 GMT
In article <9du2nd$gub$[EMAIL PROTECTED]>, Rene Herman wrote:
>Grant Edwards wrote:
>
>> However my driver includes /usr/src/linux/net/tcp.h.
>
>[ snip ]
>
>> Why are the kernel header files from net/scsi not made visible in
>> a standard way?
>
>Because glibc provides its own net and scsi headers.
I'm not using glibc in my driver module.
>User mode code should never include kernel headers directly anyway.
I'm asking specifically about a driver, not user-mode code.
>If I am not mistaken, back in the libc5 days, /usr/include/{net,sci} *were*
>symlinks into the kernel tree.
>Driver code should most certainly *not* rely on the glibc headers (not to
>mention the fact that my version of glibc doesn't even seem to be providing
>tcp.h).
I'm not talking about the glibc tcp.h file. I'm talking about
/usr/src/linux-2.4.2/net/tcp.h. RH7.1 doesn't install a link from
/usr/src/linux to the place where kernel sources are -- so I've got to do
some magic in my Makefile to try to find the kernel sources.
>Really, I believe you should dump your source into the kernel tree (ie, the
>one that's installed from the kernel-source package) and integrate it into
>the regular kernel build proces.
That sounds fine, but you're not the boss of me. :)
The people who _are_ the boss of me decided that we _will_ distribute a
driver seperately from the kernel sources. What we distribute includes a
daemon and several user-mode applications as well, and the whole thing
(driver module, system daemon, user-programs) _will_ build and install under
RH7.1 with a single "make install" after you untar the distribution file.
That is my requirement -- whether it's the way you'd do it or not.
Most of our customers probably have never even built a kernel and requiring
them to patch the kernel sources and then do a kernel configuration and
build is right out.
>Of course, this has the added advantage that when and if you decide that
>your driver would make a worthy addition to Linux, it will simply be a
>matter of submitting the patch. As far as I am aware (admittedly not very
>far) 3rd party drivers are *always* distributed as kernel patches, so again,
>I believe you should really want to do this.
It's not my decision.
--
Grant Edwards grante Yow! My ELBOW is a remote
at FRENCH OUTPOST!!
visi.com
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Generic SCSI driver
Date: Wed, 16 May 2001 15:00:23 GMT
In article <[EMAIL PROTECTED]>, Andrzej Stypula wrote:
>Kasper Dupont wrote:
>> Andrzej Stypula wrote:
>> > OK.I know, when I need to mount device I have to use the specialized
>> > driver like /dev/sd? or /dev/hd? But how I can bind/remove the generic
>> > driver outside the lilo.conf?
>> > If generic is binding I can not use specialized driver
>>
>> I don't think it is posible to use /dev/hd?
>> and /dev/sg? simultaneously on the same drive.
>> But it is posible to use /dev/sg? and /dev/sd?
>> simultaneously on the same drive.
>>
>> Is it a CD or a harddisk you want to use?
>
> I have the atapi CD (at /dev/hdd) so, some times I want to read this
> as scsi device (for ex. readcd requires the scsci device).
> If I add the line 'append hdd=ide-scsi' in my lilo.conf, when
> I have info in /proc about this binding, and until now all is OK.
> But I can not to mount any fs by /dev/hdd - this is my problem.
> All is OK if generic is unloaded but in this case I can not to
> use /dev/sg?.
If you want to mount a filesystem with the ide-scsi module loaded do it
using /dev/scd0.
> up to now I do not find any solution for this problem.
> Maby magic line in conf.modules?
--
Grant Edwards grante Yow! You can't hurt
at me!! I have an ASSUMABLE
visi.com MORTGAGE!!
------------------------------
Date: Wed, 16 May 2001 11:14:00 -0400
From: Adam Shapira <[EMAIL PROTECTED]>
Subject: Re: Formulating Compatibility Signature:
Rene Herman wrote:
>
> Adam Shapira wrote:
>
> > Is there any more official way of determining a compatibility
> > signature other than using the OS_TYPE and HOSTTYPE environment
> > variables?
>
> Parsing the ouput from "uname" I guess. Do a "uname --help", "man
> uname" or "info uname" for more information.
>
> Hope this helps.
> Rene Herman
Thanks a lot. I've tried this command on the RH6.x machine. But
though I haven't yet gotten to try it on the RH7 machine, my
intuition tells me that this command's behaviour is just as
non-standard as the Environment Variables (if not more so).
------------------------------
From: Rene Herman <[EMAIL PROTECTED]>
Subject: Re: Path to kernel include directory?
Date: Wed, 16 May 2001 17:16:18 +0200
Grant Edwards wrote:
> I'm not using glibc in my driver module.
Obviously you're not, as I said, you *should* not. But you were asking
why net and scsi aren't symlinks into the kernel tree, and that's the
question I answered. If you didn't want it answered, why bother asking?
> That is my requirement -- whether it's the way you'd do it or not.
Good luck!
Rene.
------------------------------
From: "Darren LS" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,linux.redhat.devel,linux.redhat.development
Subject: Re: X windows
Date: Wed, 16 May 2001 16:11:17 +0100
Nithyanandham <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
>
> Darren LS wrote:
>
> > Hi all. Can anyone point me toward a decent tutorial to X windows
> > programming?
>
> A very good Documentation on X windows.:-
> http://www.cs.cf.ac.uk/Dave/X_lecture/X_book_caller/index.html
wow I have seen smaller planets but it looks like a good place to start
Thanks
Darren
------------------------------
From: Rene Herman <[EMAIL PROTECTED]>
Subject: Re: Formulating Compatibility Signature:
Date: Wed, 16 May 2001 17:27:20 +0200
Adam Shapira wrote:
[ uname ]
> Thanks a lot. I've tried this command on the RH6.x machine. But
> though I haven't yet gotten to try it on the RH7 machine, my
> intuition tells me that this command's behaviour is just as
> non-standard as the Environment Variables (if not more so).
Certainly not more so, as the uname utility is an inter-platform
utility (it's in the Single UNIX Specification, wouldn't know about
POSIX) while, unless I'm mistaken, the environment variables you
mention are specific to bash and/or your Linux setup.
Still, it might indeed not have been much of an answer, since it's
likely that these variabes get *set* fron uname. I'm afraid I don't
have a better one though.
Rene.
------------------------------
From: "Darren LS" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,linux.redhat.devel,linux.redhat.development
Subject: Re: X windows
Date: Wed, 16 May 2001 16:17:14 +0100
Nils O. Sel�sdal <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> "Darren LS" <[EMAIL PROTECTED]> wrote in message
> news:vmiM6.16696$[EMAIL PROTECTED]...
> > Hi all. Can anyone point me toward a decent tutorial to X windows
> > programming?
> A little tip is NOT to program directly to the X libraries, they're quite
> complicated...
> Use rather some nice toolkit , Qt (www.troll.no) is the best toolkit i've
> used regardless of platform and os
> GTK(www.gtk.org) is also pretty nice.
cool I have already downloaded GTK somewhere but I will download QT too
Thanks
Darren
------------------------------
From: "Darren LS" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,linux.redhat.devel,linux.redhat.development
Subject: Re: X windows
Date: Wed, 16 May 2001 16:19:37 +0100
Chuck Dillon <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
>
> Darren LS wrote:
> >
> > Hi all. Can anyone point me toward a decent tutorial to X windows
> > programming?
> >
> > Thank you most kindly
> >
> > Darren
>
> I suggest you direct yourself to comp.windows.x and its friends
> comp.windows.x.*. I also suggest you browse Ken Lee's page which
> contains lots of articles including tutorials I believe. It's at
> http://www.rahul.net/kenton/xsites.framed.html
>
lovely. thanks
Darren
------------------------------
From: "Darren LS" <[EMAIL PROTECTED]>
Subject: Re: passing messages to a forked thread
Date: Wed, 16 May 2001 16:25:16 +0100
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Tue, 15 May 2001 23:35:32 +0100 Darren LS <[EMAIL PROTECTED]> wrote:
>
> | Hello all. I have a nice little socket programmed than runs
transparently
> | due to the fork command thanks to the advice of many wonderful people on
> | these newsgroups. However now I need to do some manipulation to the
> | currently running process. I appreciate any advice on the following
> |
> | 1. this thread must be able to detect if it is the only instance running
and
> | if not then it needs to be able to get the process handle of other
instances
> | so it can communicate with them
>
> Only instance of what? Of a particular executed program file? Of being
> forked from the same parent?
hmm good question. The former is what i am really looking for but the latter
would be handy too
>
>
> | 2. Active instances must be able to take signals of other threads,
processes
> | or even programs
>
> Depending on what you are expecting, this may or may not be possible.
I'm looking for something a bit like a message pipe
>
>
> | 3. must be able to send signals to other processes both local and remote
>
> What do you mean by remote? On a different computer?
yes
>
>
> | 4. must be able to ignore SIGTERM and should SIGKILL be thrown at it
then it
> | needs to survive long enough to fill in a log entry before it goes down.
I
> | appreciate any ideas.
>
> SIGKILL is defined as not being interceptable. The only way to detect
such
> a signal is to have a parent waiting for it and have that parent enter the
> log entry (if it is also not killed).
yes i inderstand you cannot stop the kill so what you said sounds good to me
>
> It is possible for an errant process to go into a loop when it's handling
a
> signal. How would you kill such a process if you didn't have a SIGKILL
that
> was not interceptable?
oh i understand completely. I do not want to intercept it just log a
shutdown
I hope I was a bit more clear :-)
------------------------------
From: Vishnu Vardhan C K <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.programming.threads
Subject: Re: SIGSEGV is not blocking
Date: Wed, 16 May 2001 21:04:54 +0530
Hi! All..
> >Now, setting a signal's disposition to SIG_IGN is not the same as
> >blocking it. When blocked, it's still pending.
> >
> >So although we're doing something kinda strange here, by theory and
> >documentation I agree that it ought to work, and am curious why it
> >doesn't.
>
> Where is your program going to go after a seg fault? That's why the
> results are undefined.
I am not sure i am talking sense here, but would it make sense
to do a longjump from the signal handler ?
I don't know just guessing..
--
Email: vishnu at miel dot mot dot com
**************************************************
[X]General Business Information
[]Motorola Internal Use only
[]Motorola Confidential Proprietary
**************************************************
------------------------------
From: [EMAIL PROTECTED] (Ian D Romanick)
Crossposted-To: comp.os.linux.hardware
Subject: Re: Will Linux recognize >4GB RAM on Pentium-III Xeon?
Date: 16 May 2001 09:00:05 -0700
[EMAIL PROTECTED] (Doug Chan) writes:
>Thanks!
>I read somewhere that the process address space is still limited to
>less than 4GB?
Yes. Each process is still limited to, as I recall, 3GB of address space.
The only way around that is to move to a 64-bit architecture. If don't need
IA32 application support (i.e., you don't need Oracle on IA32 for Linux,
etc.) you might look at either Alpha or Power3. On both platforms you'll
get more address space that you could possibly afford the physical RAM for,
and way, WAY more compute power. Those two chips and PA-RISC are
*consistently* the fastest CPUs at any clock speed.
--
"In the past, rogue architectures found it difficult to survive, even when
they offered breakthrough features. (Remember the Amiga?)"
-- Tom Halfhill, Byte Feb. 98, p. 74
http://www.cs.pdx.edu/~idr/
------------------------------
From: [EMAIL PROTECTED] (Stefaan A Eeckels)
Subject: Re: Will Linux recognize >4GB RAM on Pentium-III Xeon?
Crossposted-To: comp.os.linux.hardware
Date: Wed, 16 May 2001 15:48:13 +0200
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Doug Chan) writes:
> In article <[EMAIL PROTECTED]>,
> Johan Kullstam <[EMAIL PROTECTED]> wrote:
>>[EMAIL PROTECTED] (Doug Chan) writes:
>>
>>> Thanks!
>>> I read somewhere that the process address space is still limited to
>>> less than 4GB?
>>
>>yes. i believe this is true for ia32 processors such as the p-3 xeon.
>>
>>what is the situation for 64 bit processors such as ultrasparc or
>>alpha? these might have larger limits on memory usage.
>>
>>you seem willing to part with large coin since you are considering the
>>intel wallet vaccuum -- maybe equipment from, e.g., sun would be
>>competitive in price/performance?
>>
> Actually, I'm currently running Solaris 5.8 on various Sun hardware
> but looking to switch to Linux & Intel-based equipment for cost
> and performance reasons.
> So far, memory sizing is the biggest issue with going to Intel plaforms.
> Maybe I'll have to wait until IA-64 hardware comes out...
Don't forget IO bandwidth either. It's not often that you
find reasonably priced IA32 kit with multiple PCI busses,
redundant power supplies, and the reliability of the larger
Sun servers (and if you do, you'll find that the price advantage
isn't all that much). Add to that the fact that high-end IA32
kit is a much rarer beast than a comparable Sun server, and
that your local Compaq/Dell service provider will know diddly
squat about the box.
It is a fact that the Megahertz explosion triggered by the
Intel/AMD battle has catapulted the IA32 architecture to the
front of CPU performance, but it has also put the squeeze on
Intel WRT the IA64 (not being binary compatible with the IA32,
there's no reason it'll make a better market impression than
the Alpha, if it cannot run current code at IA32 speed levels
in emulation mode. A tough act when the current entry level
IA32 CPUs are 700MHz Athlons and 866MHz PIIIs.).
It's also good to keep in mind that it's only since 2.4 that
Linux can lay claim to good SMP support, and that the experience
with large IA32 SMP boxes is _very_ limited; if you know a
good and not too expensive source of >8 CPU Xeon boxes, I'd
sure be glad to get their address.
--
Stefaan
--
How's it supposed to get the respect of management if you've got just
one guy working on the project? It's much more impressive to have a
battery of programmers slaving away. -- Jeffrey Hobbs (comp.lang.tcl)
------------------------------
From: [EMAIL PROTECTED] (Ian D Romanick)
Subject: Re: Can I use aio_read() for UDP sockets?
Date: 16 May 2001 09:03:19 -0700
"Roger Tragin" <[EMAIL PROTECTED]> writes:
><[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
>> Roger Tragin <[EMAIL PROTECTED]> wrote:
>>
>> >Under Windoze I am using WSARecvFrom() to read datagrams from a UDP
>socket
>> >asynchronously. Is there an equivalent under Linux?
>>
>> Set the socket to non-blocking and use read. Or you can use select.
>There is a difference between non-blocking and asynchronous (at least in my
>mind :). I am looking for the same semantics as aio_read() where the
>function call returns when the request has been initiated or queued. The OS
>will read data into my buffer, and when it has completed it will generate a
>signal.
>
>This is different to non-blocking where you set the socket in non-blocking
>mode and use select to tell you when there is a datagram to read, and then
>you have to do the read in user space.
I *believe* that at least some support for the async I/O calls exists in
more recent versions of glibc w/2.4 kernels. The other option is to create
another thread that will do the read and send a signal to the original
thread when it completes. It's ugly, but it will work.
--
"In the past, rogue architectures found it difficult to survive, even when
they offered breakthrough features. (Remember the Amiga?)"
-- Tom Halfhill, Byte Feb. 98, p. 74
http://www.cs.pdx.edu/~idr/
------------------------------
** 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 by posting to the
comp.os.linux.development.system newsgroup.
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
******************************