Linux-Development-Sys Digest #793, Volume #7 Sat, 22 Apr 00 05:13:11 EDT
Contents:
Re: "defunct" child process (niels)
Re: Porting our compiler to Linux (Grant Edwards)
Driver needed for V.90/K56Flex Conexant Chipset "Riptide" Winmodem (Rohit Samson
Dean)
Re: fine tracing memory usage ? (Pankaj Chhabra)
Re: 2.3.99-pre5 and umount problem (jwk)
Re: Porting our compiler to Linux ("Norman Black")
Re: Porting our compiler to Linux (Kaz Kylheku)
Re: Driver needed for V.90/K56Flex Conexant Chipset "Riptide" Winmodem (Greg Horne)
Re: "defunct" child process ([EMAIL PROTECTED])
module for linux kernel
Re: Trouble installing GNU C from Red Hat 6.0 CD (Raptor)
Ctl-Alt-Del ("Sake")
Re: Ctl-Alt-Del (Kaz Kylheku)
How To Protect Memory From Swapping ??? ("Mike")
Linux/m68k on a Q950? (DigitalRealmz)
Is It Possible To Decompile Kernel Modules? (Young4ert)
How can I read keyboard scancodes? (sh)
Re: Partition Access (Peter Mutsaers)
Re: How To Protect Memory From Swapping ??? ("Mike")
----------------------------------------------------------------------------
Date: Fri, 21 Apr 2000 18:26:03 +0200
From: niels <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: "defunct" child process
Dave wrote:
> What in the heck does that defunct mean??? What causes it? where can I
> read more about it?
>
> Thanks
> Dave
I nice way of handling this is setting up a signalhandler to catch
terminating child signals.
I've included a small sample showing how it could be done:
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
/* the signal handler */
void handler(int sig) { psignal(sig,"signalhandler");wait(0); }
main(int argc,char *argv[])
{
int pid,time;
/* set up signal handler */
signal(SIGCHLD,&handler);
/* fork first child */
if((pid = fork())<0) perror("fork()");
if(pid==0) { printf("child 1\n");sleep(10);exit(0); }
/* fork second child */
if((pid = fork())<0) perror("fork()");
if(pid==0) { printf("child 2\n");sleep(10);exit(0); }
else
{
printf("parent\n");time = 20;
while (time != 0)
{ time = sleep(time);printf("time left %d\n",time); }
}
}
You could also do only a signal(SIGCHLD,SIG_IGN) in the parent, but i
believe this is not allowed by POSIX
and might reduce portability.
Be aware that blocking system calls can get interupted when receiving a
signal with a signal handler, like sleep
in the above example, this does not happen when you just ignore the
signal.
Reading stuff related to above example :
man 7 signal
man 2 signal
man 3 sleep
man 2 fork
man 2 wait
- Happy coding
Niels Thomsen
------------------------------
From: grant@nowhere. (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting our compiler to Linux
Date: Fri, 21 Apr 2000 16:44:30 GMT
In article <8dnmbl$59f$[EMAIL PROTECTED]>, Norman Black wrote:
>We have started porting our Modula-2 development system to Linux and I was
>hoping to find some help/documentation, mailing lists, newsgroups...
The gnu binutils mailing list would probably be a good thing to
know about. Take a look at www.sourceware.cygnus.com/binutils
--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
visi.com
------------------------------
From: Rohit Samson Dean <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Driver needed for V.90/K56Flex Conexant Chipset "Riptide" Winmodem
Date: Fri, 21 Apr 2000 13:33:48 -0400
Hi All,
I am looking for a (somewhat) stable driver for my Smart Modular
Technologies V.90/K56Flex PCI modem. I am running RH 6.2 on a
HP-Pavillion 9680C. Can someone please point me in the correct
direction. I have already checked linmodems.org, smartm.com, and 56K.com
et,al. In fact if anyone can point me to the right resources I may even
start work on a device driver myself (I am so fed up with searching).
Thanx
Rohit Samson Dean
P.S. To reply please remove NOSPAM from the from address
------------------------------
From: Pankaj Chhabra <[EMAIL PROTECTED]>
Subject: Re: fine tracing memory usage ?
Date: Fri, 21 Apr 2000 11:32:46 -0700
Hi,
>From the application level, you can use mem command to track the memory.
mem command with option (I think it is -s <seconds>) can give you memory
statistics periodically.
You can change the resources for a process. There are access restrictions on
who can make changes. getrlimit and setrlimit should be able to help you to
set the resources for the process.
Good luck.
- Pankaj
every
Eric GAUDET wrote:
> hi all, I'm looking for some way to ask the kernel all sort of
> informations about memory usage :
> - list of all the current mallocs
> - which process owns one malloc
> - buffers informations
> - cache informations
>
> I need that in order to release "lost" mallocs and flush unused caches and
> buffer, or at least know which process is eating all available memory.
>
> Is there any way to limit the maximum memory usage of one process ?
>
> Thanks.
> Eric
------------------------------
From: [EMAIL PROTECTED] (jwk)
Subject: Re: 2.3.99-pre5 and umount problem
Date: 21 Apr 2000 19:06:33 GMT
Reply-To: [EMAIL PROTECTED]
On 21 Apr 2000 13:28:00 GMT, Daniel Weiskopf
<[EMAIL PROTECTED]> wrote:
>Hi. I recently upgraded from 2.2.14 to 2.3.99-pre5, and now when I
>shutdown my system, my /home and /usr partitions don't umount cleanly
>because init claims they're busy. The result is a lengthy fsck when I
>reboot. I'm using SysVinit 2.76 and util-linux 2.10k. Never had the
>problem with the earlier kernels, and I upgraded everything that was
>mentioned in the 2.3 Changes file. Any suggestions?
>
yep. subscribe to linux-kernel-digest if you diddle with the latest
pre-x kernels. Then you'll learn about those small errors soon, and get
nifty patches to solve them too :-)
Good luck,
Jurriaan
PS It's a relatively harmless bug, IIRC. My suse distro does an
automatic remount to ro and didn't need an fsck at the next boot....
--
Seed me, Seymour
a random number generator meets the big green mother from outer space
Linux 2.2.15pre17 SMP 5 users load av: 0.41 0.14 0.05
------------------------------
From: "Norman Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting our compiler to Linux
Date: Fri, 21 Apr 2000 13:00:46 -0700
Reply-To: "Norman Black" <[EMAIL PROTECTED]>
> Of the very few people who even care, I am rather happy that the world
> class Stony Brook compiler is coming to Linux. Mind, I don't know if I
> would ever use Modula-2 again. :(
High praise indeed. Thanks!
> >1. Specifics of application startup ( I have looked at the glibc source
code
> >but some symbols are missing)
>
> Perhaps those are in crt0.o, supplied by the fine C compiler.
No crt0 source in glibc 2.1. I found various (numerous) start.c files. The
ELF start files refer to a symbol not declared anywhere in the glibc source
code (libc_start_main)
> >3. Specifics of linking executables and shared objects.
>
> Handled by ld.so, in one of its many incarnations on Linux boxes.
> Source code is available for inspection.
Actually reverse engineering might be easier.
Thanks for your help.
--
Norman Black
Stony Brook Software
To reply via email reverse the identifiers in the domain.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Porting our compiler to Linux
Reply-To: [EMAIL PROTECTED]
Date: Fri, 21 Apr 2000 20:08:11 GMT
On 21 Apr 2000 15:23:42 GMT, William Burrow <[EMAIL PROTECTED]> wrote:
>On Thu, 20 Apr 2000 12:41:26 -0700,
>Norman Black <[EMAIL PROTECTED]> wrote:
>>We have started porting our Modula-2 development system to Linux and I was
>>hoping to find some help/documentation, mailing lists, newsgroups...
>
>Of the very few people who even care, I am rather happy that the world
>class Stony Brook compiler is coming to Linux. Mind, I don't know if I
>would ever use Modula-2 again. :(
There is a GNU Modula 2 compiler. I've never used it so I can't vouch for
any of its attributes such as installation ease, completeness, etc.
--
#exclude <windows.h>
------------------------------
From: Greg Horne <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Re: Driver needed for V.90/K56Flex Conexant Chipset "Riptide" Winmodem
Date: Fri, 21 Apr 2000 20:18:06 GMT
WinModems do not generally work with Linux with few exceptions. You checked
the right sources on the net, so now go buy a real modem.
Rohit Samson Dean wrote:
> Hi All,
> I am looking for a (somewhat) stable driver for my Smart Modular
> Technologies V.90/K56Flex PCI modem. I am running RH 6.2 on a
> HP-Pavillion 9680C. Can someone please point me in the correct
> direction. I have already checked linmodems.org, smartm.com, and 56K.com
> et,al. In fact if anyone can point me to the right resources I may even
> start work on a device driver myself (I am so fed up with searching).
>
> Thanx
> Rohit Samson Dean
>
> P.S. To reply please remove NOSPAM from the from address
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: "defunct" child process
Date: Fri, 21 Apr 2000 20:27:04 GMT
It is because the child finishes or dies, but the parent process is not
calling the wait function on the child pid's. There are actually
several functions that can be used: wait, waitpid, wait3, wait4...
These defunct processes are what are called zombie process. Basically
the process is exited, but the parent hasn't called for them to be
removed from the kernel process list.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: <[EMAIL PROTECTED]>
Subject: module for linux kernel
Date: Fri, 21 Apr 2000 21:30:16 GMT
Hi,
I want develop a master slave network device driver. After making one of
them master its device struct. Help me how to load such types of modules?
and the master identifies/loadd the slaves during laoding.
hoping for treply at the earliest.
Thank you
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: Raptor <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.development
Subject: Re: Trouble installing GNU C from Red Hat 6.0 CD
Date: Fri, 21 Apr 2000 20:14:58 -0600
Raptor wrote:
>
> Lorenzo Bettini wrote:
> >
> > Jason wrote:
> > > This all makes sense except that when I type 'rpm -i *egcs*' I get a
> > > bunch of errors indicating that things couldn't be installed because of
> > > various dependency issues. I'm not sure how to proceed. Also, the
> >
> > These errors say that, in order to install this package, first you have
> > to install the packages it depends on... this is recursive, i.e. while
> > installing one of these package you may have to install other package as
> > well...
> >
> > Lorenzo
>
> I'm a newbie myself, but the book says you can frequently ignore the
> warnings and install the package anyway. Tell rpm to ignore the
> situation; see the man page. There's a good chance it'll work, but it
> could also crash hard.
A better technique I've used today is to mount the CD, cd to the RPM
package directory. Use rpm from the command line (I feel like such a
Unix dude now). When you get a dependancy error, dir for the required
package and install it. Then recurse back to your original desired
package. Some dependancies will call for libraries that don't have
easily-found package names. I took a chance that they're already
installed.
--
Lynn Wallace http://www.xmission.com/~lawall
Be patient! It took us forty million years for us to develop a thumb.
It'll probably take us forty million years to get it out of our ass.
------------------------------
From: "Sake" <[EMAIL PROTECTED]>
Subject: Ctl-Alt-Del
Date: Fri, 21 Apr 2000 22:31:32 -0400
Hi,
Is there a way to disable the Ctl-Alt-Del ?
I'm building a system and I don't want it to
be rebooted by anybody pressing Ctl-Alt-Del .
e-main response would be great
Thanks in advance.
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Ctl-Alt-Del
Reply-To: [EMAIL PROTECTED]
Date: Sat, 22 Apr 2000 02:43:48 GMT
On Fri, 21 Apr 2000 22:31:32 -0400, Sake <[EMAIL PROTECTED]> wrote:
>Hi,
>
>Is there a way to disable the Ctl-Alt-Del ?
>I'm building a system and I don't want it to
>be rebooted by anybody pressing Ctl-Alt-Del .
Comment out the line in your /etc/inittab which contains ctrlaltdel
Then ``kill -HUP 1'' and try the three finger salute
Read the inittab man page
--
#exclude <windows.h>
------------------------------
From: "Mike" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: How To Protect Memory From Swapping ???
Date: Sat, 22 Apr 2000 03:11:27 GMT
Hi All,
I have a buffer pool module for an application that I am writing, and I
need to know how to protect these buffers from being swapped to disk by the
Linux's memory manager.
The buffers are allocated useing a call to valloc() then used for DMA
transfers from a raw device. The application reuses these buffers by putting
them into a buffer pool ( basically a fifo ) and requesting a buffer from
the pool when it needs them.
Ive scoured the net, but I havent seen any specific reference, as in "How
To Protect a Dynamically Allocated Block of Memory from Swapping." I know
its probably as simple as a function call somewhere.
If anyone can explain the process, or point me towards a man page, that
would be great, as Im stuck until I figure this out.
Take Care!
mike
[EMAIL PROTECTED]
------------------------------
Date: Sat, 22 Apr 2000 00:43:19 -0400
From: DigitalRealmz <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Linux/m68k on a Q950?
Hi.
has anyone managed to get lm68k onto a Quadra 950 successfully? If so,
what's the secret?
Thanks,
V
--
------------------------------------------------------------------------
Win an iMac and other great prizes at
www.bluebuttbunny.com
Funny name. Cool site!
------------------------------------------------------------------------
------------------------------
From: Young4ert <[EMAIL PROTECTED]>
Subject: Is It Possible To Decompile Kernel Modules?
Date: Sat, 22 Apr 2000 01:13:34 -0400
Hi,
I am not sure if this is the right NG that I am supposed to post the
question. Anyway, this may sound awkward; however, I have mistakenly
deleted some of my own source files that I used to develop some drivers
for Linux kernel. However, I may be a little bit lucky since I do have
the object files (not stripped) that I compiled from the source using
-O2 optimization switch. The question is if it is possible to decompile
the object files to regain the source. If so, what decompilation
utility I should use?
TIA.
--
[EMAIL PROTECTED]
PS> Remove the "4" from e-mail address to respond.
------------------------------
From: sh <[EMAIL PROTECTED]>
Subject: How can I read keyboard scancodes?
Date: Sat, 22 Apr 2000 08:26:55 +0200
I am currently porting an application (not a driver) for a standard PC.
The
application needs 16 bit scancodes from the keyboard (rather than
translated
codes provided by getchar() etc). Until now, I have inferred the
following
from the libc and kernel sources:
1. The "real" keyboard reading is performed by kbd_read_input(), a
macro defined as inb(KBD-DATA_REG) in keyboard.h.
2. The programme pc_keyb.c seems to install an interrupt routine which
uses kbd_read_input() in the routine handle_kbd_event().
However, these are kernel sources. In the libc sources I have found no
low level routines which actually get keyboard data. I do not understand
the way the kernel provides application programmes whith these data,
i. e. the transition of keyboard data from kernel space to user space.
My question is due to my lack of understanding the Linux architecture.
So
it is of more general interest and also applies to disk data etc. I am
sure
that there are some experts here who have the right answers.
Sincerely, Prof. Homburg
--
Prof. Dr. Stefan Homburg
Lehrstuhl Oeffentliche Finanzen
Universitaet Hannover
Koenigsworther Platz 1
D-30167 Hannover
Tel.: (0049) 511-762-5633
Fax.: (0049) 511-762-5656
------------------------------
Crossposted-To:
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: Re: Partition Access
From: Peter Mutsaers <[EMAIL PROTECTED]>
Date: Sat, 22 Apr 2000 06:37:29 GMT
>> "DK" == Daniel Kiracofe <[EMAIL PROTECTED]> writes:
DK> Ah yes, /proc, The One True Kernel Interface. So tell me,
DK> why should
DK> the kernel go to all the trouble of printing out it's data
DK> structures in human readable ASCII and then have my program go
DK> all the trouble to parse the ASCII, when I could just get a
DK> copy of the necessary struct directly? /proc is great for
DK> humans, and I've used it with Perl before, but from C, it's
DK> cumbersome...
Which is exactly why some developers of other OSses (such as FreeBSD
or Solaris) keep despising it, and hating it when they have to emulate
Linux. There was just an issue in FreeBSD for example, where they put
a linux-like /proc in the linux emulator. It is hated but necessary
for some Linux programs to run.
/proc was intended for, as the name says, information on processes
(mainly for debugging purposes). That is what most modern Unices use
it for. In Linux it has grown into something that should never have
been, especially not for use in programs.
--
Peter Mutsaers | D�bendorf | Trust me, I know
[EMAIL PROTECTED] | Switserland | what I'm doing.
------------------------------
From: "Mike" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: Re: How To Protect Memory From Swapping ???
Date: Sat, 22 Apr 2000 08:25:14 GMT
I think I may have answered my own question.
A call to mlock() looks like it will do the trick.
Cany anyone verify that this is the correct method??
mike
[EMAIL PROTECTED]
"Mike" <[EMAIL PROTECTED]> wrote in message
news:zL8M4.3086$[EMAIL PROTECTED]...
> Hi All,
>
> I have a buffer pool module for an application that I am writing, and I
> need to know how to protect these buffers from being swapped to disk by
the
> Linux's memory manager.
>
> The buffers are allocated useing a call to valloc() then used for DMA
> transfers from a raw device. The application reuses these buffers by
putting
> them into a buffer pool ( basically a fifo ) and requesting a buffer from
> the pool when it needs them.
>
> Ive scoured the net, but I havent seen any specific reference, as in
"How
> To Protect a Dynamically Allocated Block of Memory from Swapping." I know
> its probably as simple as a function call somewhere.
>
> If anyone can explain the process, or point me towards a man page, that
> would be great, as Im stuck until I figure this out.
>
> Take Care!
>
> mike
> [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
******************************