Linux-Development-Sys Digest #440, Volume #8     Wed, 24 Jan 01 10:13:14 EST

Contents:
  This time is "df". Please help ("Alan Po")
  Kernel Freeze on Bootup
  Re: execv() blocking after using threads ("Arthur H. Gold")
  Re: This time is "df". Please help (Josef Moellers)
  Re: The fastest way to write a pixel under X ([EMAIL PROTECTED])
  kernel and size_t ("O.Petzold")
  Httpd Error. ("Allan Van Zyl")
  2.2.18: Cannot NFS export mounted vfat FS (Hans-Detlev Fink)
  Re: How to write an application similar to "ps -aux" (elmig)
  Re: installing ddd ([EMAIL PROTECTED])
  Re: make bzImage fails (James Carr)
  Writing Athlon Code (Maximilian Gauger)
  gcc and spec file ("Andrew Voznytsa")
  Help needed with signals (Ilia Bunin)
  PPP & Router ARP Cache Timeout Question (David Ronis)
  Re: Writing Athlon Code ("SVIC BSO")

----------------------------------------------------------------------------

From: "Alan Po" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.dev.c-programming
Subject: This time is "df". Please help
Date: Wed, 24 Jan 2001 13:02:04 +0800

Dear all

Alan Po again. This time the problem is "df". I have tried to read the
source of "df" but cannot get any idea. Please give me some advices again on
writing an application which can get the similar result as "df". I know it
may be the most difficult question. Thanks for any idea.

Thanks again,

Alan Po



------------------------------

From: <[EMAIL PROTECTED]>
Subject: Kernel Freeze on Bootup
Date: Wed, 24 Jan 2001 06:30:07 -0000

  I'm running Win98/Red Hat 6.2 on a Pentium III/600 and a Quantom 
Fireball Plus KX that runs on a Promise controller.
  A couple months ago, I downloaded 2.4.0-test9, upgraded my system as per 
Documentation/Changes, recompiled, rebooted, everything ran fine. A couple 
weeks later, feeling adventerous again, I upgraded to -test11. I 
recompiled fine, saved my old bzImage in lilo and rebooted. This time 
though, when the Kernel tries to initialize the controller card and 
harddrives, it just froze. The blinking cursor stopped. Experimenting, I 
found out that if I hit Crtl-alt-del pretty quickly after it stopped, I 
could reboot, but if I waited too long, it wouldn't even respond to that.
  So, I figure no problem- I loaded my old image, 2.4.0-test9, went 
through my confifuration. Everything seemed right: The kernel options for 
my controller card were right. I tried to recompile a few times, but 
nothing seemed to help. So, I just put it off for a while, figuring that 
the patchlevel was bad.
  A week goes by, and I decide that typing in 'stable' was too much work 
when booting, so I reversed the patches on the kernel back to test9, 
reconfigure and recompile.. but suddenly, it locks up at the same place 
too. That's crazy, I thought, but my stable Image still worked, so I put 
it off until 2.4.0 was released, downloaded the whole thing fresh, 
doublechecked Documentation/Changes, recompiled.. and I have the same 
problem. Except this time, when I tried to load the stable image, /it/ 
froze it in the same place as the unstable ones. So I figured, maybe 
my /boot partitian is full, and the kernel can only read the image up to 
the middle. So I cleaned it out a little, tried again, but for nothing.
  So, any idea what's going on? I'm locked into booting Windows for the 
time being, which isn't very fun. While I don't have a copy of the dmesg 
on my, it goes along the lines of..

ide0 detected at xxxxx IRQ x
ide1 detected at xxxxx IRQ x
ide2 detected at xxxxx IRQ x
<Freeze>
Next, it would normally detect hde, my linux partition.
(The Promise controller is an add-on controller. But, instead of using the 
Add-on-card boot first option in the Kernel, because I'm lazy and don't 
want to switch everything around in my lilo.conf and fstab files, I just 
keep it as hde. hda,b,c,d are claimed by ide0, the motherboard's builtin 
controller)

Any help would be appreciated.

--
Posted via CNET Help.com
http://www.help.com/

------------------------------

Date: Wed, 24 Jan 2001 01:46:09 -0600
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: execv() blocking after using threads

[EMAIL PROTECTED] wrote:
> 
> Greetings good linux people,
> 
> I have a situlation where calls to execv() are
> blocking.  A stack trace (below) shows execv() is
> trying to shutdown all running threads before
> doing the actual exec bit.  I already stopped my
> threads but thread manager thread is perhaps
> causing the problem?
Unfortunately, you've provided all but the most relevant
information, i.e. which libc you are using (ISTR that this
was fixed in 2.1.3). In any event, the following man page
should help:

PTHREAD_KILL_OTHER_THREADS_NP

Section: C Library Functions (3)
Updated: LinuxThreads
Index Return to Main Contents


  

NAME

pthread_kill_other_threads_np - terminate all threads in
program except calling thread 

  

SYNOPSIS

#include <pthread.h> 

void pthread_kill_other_threads_np(void); 

  

DESCRIPTION

!pthread_kill_other_threads_np! is a non-portable
LinuxThreads extension. It causes all threads in the program
to terminate immediately, except the calling thread which
proceeds normally. It is intended to be called just before a
thread calls one of the !exec! functions, e.g. !execve!(2). 

Termination of the other threads is not performed through
!pthread_cancel!(3) and completely bypasses the cancellation
mechanism. Hence, the current settings for
cancellation state and cancellation type are ignored, and
the cleanup handlers are not executed in the terminated
threads. 

  

AUTHOR

Xavier Leroy <[EMAIL PROTECTED]> 

  

SEE ALSO

!execve!(2), !pthread_setcancelstate!(3),
!pthread_setcanceltype!(3), !pthread_cancel!(3). 

  

BUGS

According to POSIX 1003.1c, a successful !exec*! in one of
the threads should terminate automatically all other threads
in the program. This behavior is not yet
implemented in LinuxThreads. Calling
!pthread_kill_other_threads_np! before !exec*! achieves much
of the same behavior, except that if !exec*! ultimately
fails, then all
other threads are already killed. 

HTH,
--ag
-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account
for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Yes I would. But not enough to put it out.

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.dev.c-programming
Subject: Re: This time is "df". Please help
Date: Wed, 24 Jan 2001 09:07:47 +0100

Alan Po wrote:
> =

> Dear all
> =

> Alan Po again. This time the problem is "df". I have tried to read the
> source of "df" but cannot get any idea. Please give me some advices aga=
in on
> writing an application which can get the similar result as "df". I know=
 it
> may be the most difficult question. Thanks for any idea.

A usefull tool to find out how things work under Linux is "strace".
Calling "strace" on "df -k ." yields (amnong other things B-{):

fstatfs(3, {f_type=3D"EXT2_SUPER_MAGIC", f_bsize=3D4096, f_blocks=3D10465=
24,
f_bfree=3D823923, f_files=3D532224, f_ffree=3D458828, f_namelen=3D255}) =3D=
 0

You may then proceed to higher levels my calling

man fstatfs

which will tell you that the statfs structure contains a field f_bfree
=2E..

Please, Alan, do your homework alone! It really is for your own good.

Josef, this time not doing it for you.
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.x,comp.os.linux.development.apps,de.comp.os.unix.x11
Subject: Re: The fastest way to write a pixel under X
Date: Wed, 24 Jan 2001 08:19:17 GMT

I'm also interested in Linux programming. How do you create your 3D
graphics? Do you need to write the pixels into a floating window,
instead of doing fullscreen graphics?


Sent via Deja.com
http://www.deja.com/

------------------------------

From: "O.Petzold" <[EMAIL PROTECTED]>
Subject: kernel and size_t
Date: Wed, 24 Jan 2001 10:45:52 +0100

Hello,

which headers do I have to include to get size_t defined. It's done
in
/usr/include/asm/posix_types.h:typedef unsigned int     __kernel_size_t;

/usr/include/linux/types.h: typedef __kernel_size_t         size_t;

but there are some defines arround. There must be a standard way
to get it. linux/stddef.h isn't it.

Thanks
Olaf




------------------------------

From: "Allan Van Zyl" <[EMAIL PROTECTED]>
Subject: Httpd Error.
Date: Wed, 24 Jan 2001 11:48:29 +0200

This is a multi-part message in MIME format.

=======_NextPart_000_0174_01C085FB.91B66870
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In my /etc/boot.log file this error comes up on boot time Does anyone =
know how to resolve this error or what possibly could be wrong.
=20
Jan 23 19:14:57 maestro nfs: rpc.mountd startup succeeded
Jan 23 19:14:57 maestro nfs: rpc.nfsd startup succeeded
Jan 23 19:15:01 maestro httpd: [Tue Jan 23 19:15:01 2001] [error] Cannot =
resolve host name maestro.infotech-online.co.za --- ignoring!
Jan 23 19:15:01 maestro httpd: [Tue Jan 23 19:15:01 2001] [error] Cannot =
resolve host name test.netd.co.za --- ignoring!
Jan 23 19:15:01 maestro httpd: [Tue Jan 23 19:15:01 2001] [error] Failed =
to to resolve server name for 196.25.213.8 (check DNS) -- or spec
Jan 23 19:15:02 maestro httpd: httpd startup succeeded


=======_NextPart_000_0174_01C085FB.91B66870
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>In my /etc/boot.log file this error =
comes up on=20
boot time Does anyone know how to resolve this error or what possibly =
could be=20
wrong.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Jan 23 19:14:57 maestro nfs: rpc.mountd =
startup=20
succeeded<BR>Jan 23 19:14:57 maestro nfs: rpc.nfsd startup =
succeeded<BR>Jan 23=20
19:15:01 maestro httpd: [Tue Jan 23 19:15:01 2001] [error] Cannot =
resolve host=20
name maestro.infotech-online.co.za --- ignoring!<BR>Jan 23 19:15:01 =
maestro=20
httpd: [Tue Jan 23 19:15:01 2001] [error] Cannot resolve host name=20
test.netd.co.za --- ignoring!<BR>Jan 23 19:15:01 maestro httpd: [Tue Jan =
23=20
19:15:01 2001] [error] Failed to to resolve server name for 196.25.213.8 =
(check=20
DNS) -- or spec</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Jan 23 19:15:02 maestro httpd: httpd =
startup=20
succeeded</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

=======_NextPart_000_0174_01C085FB.91B66870==


------------------------------

Date: Wed, 24 Jan 2001 10:49:29 +0100
From: Hans-Detlev Fink <[EMAIL PROTECTED]>
Subject: 2.2.18: Cannot NFS export mounted vfat FS

Hi all,

since I upgraded to 2.2.18 (from 2.2.17) I can no longer
nfs export a locally mounted vfat filesystem. I export
both, root and that vfat fs which is locally mounted
on /mnt/dosE. I'm running kernel nfsd.

/etc/exports is two lines:
  / sirius(rw,no_root_squash,nohide)
  /mnt/dosE sirius(rw,no_root_squash)

/etc/fstab mount for the vfat partition is
  /dev/hda6  /mnt/dosE  vfat  auto,user  0 0

When I try to mount /mnt/dosE from another machine (sirius)
I get a permission denied error. And the rpc.mountd
on the server side issues an error message
  "Jan  8 23:21:38 hdf rpc.mountd: getfh failed: Operation not
permitted"

The root mount is ok.

Everything went well with 2.2.17.

What has changed? What have I to change?

TIA

-Hans-

------------------------------

From: [EMAIL PROTECTED] (elmig)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to write an application similar to "ps -aux"
Date: 24 Jan 2001 10:27:23 GMT

[EMAIL PROTECTED] (Alan Po) wrote in <94h0rt$[EMAIL PROTECTED]>:

>Dear all
>
>Alan Po again. This time is the question of a common command "ps". I
>need to write an application to show all the process id (pid) of the
>Linux. The result is same as "ps -aux". However, I have try to find the
>source code of "ps" but fail. Please give some advices or suggestion or
>where can find the source code of "ps".
>
>Really thanks a lot.
>
>Alan Po
>
>

 i've started to code something similar to ps -aux. After reading the 
MANual i decided to use /proc
 I have some code that (only) lists the PID. Listing the name of the proces 
is pretty similat to what i've done. The code is available on 
http://www.alunos.ipb.pt/~ee3931 search psman.zip maybe in linux or the 
programming section. Good luck,

-- 
+--------------------------------+
|elmig                           |
|http://www.alunos.ipb.pt/~ee3931|
|Luis.Figueiredo AT pt.bosch.com |
+--------------------------------+

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: installing ddd
Date: Wed, 24 Jan 2001 11:42:37 GMT

Install the motif rpms first.  You can find in redhat powertools.


[EMAIL PROTECTED] wrote:
> new to linux, i'm trying to install ddd.  i have RH linux 6.2, and ran:

> rpm -i ddd-3.2-4.i386.rpm  (got from ftp.redhat.com)

> it says libXm.so.2 is needed.

> messing w/ system libraries scares me some.  is there a painless way to
> install ddd?

> thanks!!!



> Sent via Deja.com
> http://www.deja.com/

------------------------------

From: James Carr <[EMAIL PROTECTED]>
Subject: Re: make bzImage fails
Crossposted-To: 
alt.os.linux.redhat,comp.os.linux.questions,linux.dev.c-programming,linux.dev.config,linux.dev.kernel,linux.redhat,linux.redhat.development,linux.redhat.devel,linux.sources.kernel
Reply-To: [EMAIL PROTECTED]
Date: Wed, 24 Jan 2001 11:50:31 +0000

Ahhh, a common problem :)

Simply perform a 'make dep'
then 'make bzImage'
then 'make modules'
then 'make modules_install'
then 'make bzlilo'

have fun ..

Hauser Sepp wrote:

> Hi Michael,
> 
> I had the same Problem with Kernel 2.4.0. I included a "#define
> smp_num_cpus 1" in /usr/src/linux/include/linux/kernel_stat.h. It works.
> 
> Sepp
> 
> 
> Michael Makuch wrote:
> 
> > I just did a clean install of Red Hat 7.0, went to /usr/src/linux-2.2.16
> > and did a 'make bzImage' and I get the following errors:
> >
> > $ make bzImage
> > kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce
> > -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686  -c
> > -o init/main.o init/main.ckgcc -D__KERNEL__ -I/usr/src/linux/include
> > -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
> > -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2
> > -malign-functions=2 -DCPU=686 -DUTS_MACHINE='"i386"' -c -o
> > init/version.o init/version.c
> > make -C  kernel
> > make[1]: Entering directory `/usr/src/linux-2.2.16/kernel'
> > make all_targets
> > make[2]: Entering directory `/usr/src/linux-2.2.16/kernel'
> > kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce
> > -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
> > -DEXPORT_SYMTAB -c ksyms.c
> > In file included from /usr/src/linux/include/linux/modversions.h:51,
> >                  from /usr/src/linux/include/linux/module.h:19,
> >                  from ksyms.c:14:
> > /usr/src/linux/include/linux/modules/i386_ksyms.ver:6: warning:
> > `cpu_data' redefined
> > /usr/src/linux/include/asm/processor.h:96: warning: this is the location
> > of the previous definition
> > /usr/src/linux/include/linux/modules/i386_ksyms.ver:28: warning:
> > `smp_num_cpus' redefined
> > /usr/src/linux/include/linux/smp.h:77: warning: this is the location of
> > the previous definition
> > /usr/src/linux/include/linux/modules/i386_ksyms.ver:118: warning:
> > `smp_call_function' redefined
> > /usr/src/linux/include/linux/smp.h:83: warning: this is the location of
> > the previous definition
> > In file included from /usr/src/linux/include/linux/interrupt.h:51,
> >                  from ksyms.c:21:
> > /usr/src/linux/include/asm/hardirq.h:23: warning: `synchronize_irq'
> > redefined
> > /usr/src/linux/include/linux/modules/i386_ksyms.ver:138: warning: this
> > is the location of the previous definition
> > In file included from /usr/src/linux/include/linux/interrupt.h:52,
> >                  from ksyms.c:21:
> > /usr/src/linux/include/asm/softirq.h:75: warning: `synchronize_bh'
> > redefined
> > /usr/src/linux/include/linux/modules/i386_ksyms.ver:142: warning: this
> > is the location of the previous definition
> > /usr/src/linux/include/linux/kernel_stat.h: In function `kstat_irqs':
> > In file included from ksyms.c:17:
> > /usr/src/linux/include/linux/kernel_stat.h:47: `smp_num_cpus' undeclared
> > (first use in this function)
> > /usr/src/linux/include/linux/kernel_stat.h:47: (Each undeclared
> > identifier is reported only once
> > /usr/src/linux/include/linux/kernel_stat.h:47: for each function it
> > appears in.)make[2]: *** [ksyms.o] Error 1
> > make[2]: Leaving directory `/usr/src/linux-2.2.16/kernel'
> > make[1]: *** [first_rule] Error 2
> > make[1]: Leaving directory `/usr/src/linux-2.2.16/kernel'
> > make: *** [_dir_kernel] Error 2
> >
> > I've attached the .config as distributed from RedHat.
> >
> > Why doesn't this build?
> >
> > Thanks,
> >
> > [EMAIL PROTECTED]
> >
> 



------------------------------

From: Maximilian Gauger <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Writing Athlon Code
Date: Wed, 24 Jan 2001 13:42:10 +0100

Hi all,

I am doing audio signal processing on an Athlon 800, using SuSE Linux 7.
Although the Athlon is pretty fast, I guess there might be a chance
to make it even faster using the 3DNow! architecture (or whatever 
AMD calls it at the moment).

Does anyone know something about a library that makes use of these
special features of the Athlon? I know about the agcc project, but
this is alpha code and does not quite look like what I want. I rather 
thought of a library offering vector multiplication support etc.

Even a pointer to something explaining how to do this in assembler code 
would be very welcome.

X-Posting across cold.apps and cold.system (I'm really not sure
where this belongs to), F'up2 cold.system.

Thanks a lot,

Max


------------------------------

From: "Andrew Voznytsa" <[EMAIL PROTECTED]>
Subject: gcc and spec file
Date: Wed, 24 Jan 2001 14:41:34 +0200

Hi All,

Does anyone know how I can disable (by default) exceptions in g++ ?

I dont want add to command line '-fno-execptions'.. I think it should be
specified in 'spec'-file by i dont know how.

--

rgds,

Andrew




------------------------------

From: Ilia Bunin <[EMAIL PROTECTED]>
Subject: Help needed with signals
Date: Wed, 24 Jan 2001 14:15:04 GMT

I have to port a product to a Linux platform.
I've got here Red Hat 6.2
The manual says (man signal):
Unlike  on  BSD  systems, signals under Linux are reset to
their default  behavior  when  raised.   However,  if  you
include  <bsd/signal.h>  instead of <signal.h> then signal
is redefined as __bsd_signal and signal has the BSD semantics.

Can anybody tell me please where I can find this <bsd/signal.h>?
There is no such thing under /usr/include.
Iv'e found something under /usr/lib/bcc/include/bsd but it didn't
help me. Neither looking for rpms on internet.

Thanx


Sent via Deja.com
http://www.deja.com/

------------------------------

From: David Ronis <[EMAIL PROTECTED]>
Subject: PPP & Router ARP Cache Timeout Question
Date: Wed, 24 Jan 2001 14:28:13 GMT

I'm connecting two i686's running linux-2.4.0 and pppd-2.4.0.  The
remote is set up to do proxyarp and ktune, and ip_forwarding has been
enabled in the kernel.  Things work as expected, most of the time,
however, occasionally the remote, a laptop with a static IP number and
which spends a good part of it's day hooked to the same network as the
host fails to be seen by the external network.  

We've traced the problem to an external router which has a 4 hour ARP
cache.  For now, we reduced the timeout to one hour, but this causes
some problems for the network administrators.

What's strange is that I somehow force the router to rest the cache
entry simply by connecting to another machine on our network, one
running SunOS 5.6 and the same version of pppd.  

Any idea what SunOS does that Linux doesn't or how to get linux to
force the cache to flush also?

David



------------------------------

From: "SVIC BSO" <[EMAIL PROTECTED]>
Subject: Re: Writing Athlon Code
Date: Wed, 24 Jan 2001 15:27:51 +0100

Hi Max,

You can find the 3DNOW! library on the AMD Website!

success,
Cor.


Maximilian Gauger <[EMAIL PROTECTED]> wrote in message
news:94mij2$e23up$[EMAIL PROTECTED]...
> Hi all,
>
> I am doing audio signal processing on an Athlon 800, using SuSE Linux 7.
> Although the Athlon is pretty fast, I guess there might be a chance
> to make it even faster using the 3DNow! architecture (or whatever
> AMD calls it at the moment).
>
> Does anyone know something about a library that makes use of these
> special features of the Athlon? I know about the agcc project, but
> this is alpha code and does not quite look like what I want. I rather
> thought of a library offering vector multiplication support etc.
>
> Even a pointer to something explaining how to do this in assembler code
> would be very welcome.
>
> X-Posting across cold.apps and cold.system (I'm really not sure
> where this belongs to), F'up2 cold.system.
>
> Thanks a lot,
>
> Max
>



------------------------------


** 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
******************************

Reply via email to