Linux-Development-Sys Digest #584, Volume #8 Fri, 23 Mar 01 03:13:15 EST
Contents:
Re: How to Kill "unkillable" process ([EMAIL PROTECTED])
Wannabe -- Wrote LAN driver now want to install ("QuasiCodo")
Re: How to Kill "unkillable" process (Juergen Heinzl)
Re: C++ and shell (Bernd Strieder)
Re: HowTo:Retrieve a list of structures in kernel ("He Jin")
Re: Wannabe -- Wrote LAN driver now want to install (Pjtg0707)
Too many open files error ("Victor")
Synchronous/Asynchronous Signals (Gaurav Navlakha)
Re: How to Kill "unkillable" process (Nick Andrew)
Re: How to Kill "unkillable" process (Nick Andrew)
Re: Too many open files error (Andrei Ivanov)
Re: Too many open files error ("He Jin")
Re: Wannabe -- Wrote LAN driver now want to install ("QuasiCodo")
Re: Too many open files error ("Victor")
Re: Q: adding a syscall (Kiran)
bootsector ("Moe")
Redirect boot.msg ("Meg Chan")
Re: linux floopy distro (Joerg Schmitz-Linneweber)
Re: Q: adding a syscall (Joerg Schmitz-Linneweber)
Re: Bypassing login prompt? (Rolf Magnus)
Re: bootsector (Villy Kruse)
Re: How to Kill "unkillable" process (Villy Kruse)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Subject: Re: How to Kill "unkillable" process
Date: Thu, 22 Mar 2001 23:23:06 GMT
Martin Collins <[EMAIL PROTECTED]> wrote:
: just a comment. This behaviour seems a little strange. Issuing a kill -9
: shouldn't result
: in the process being signaled. It should just be wiped by the kernel. After
: all SIGKILL is
: not supposed to be "catchable" at all.
What about a zombie process? IIRC, wouldn't it show up in the ps list,
but not really be kill-able?
--
Jeff Gentry [EMAIL PROTECTED] [EMAIL PROTECTED]
SEX DRUGS UNIX
------------------------------
From: "QuasiCodo" <[EMAIL PROTECTED]>
Subject: Wannabe -- Wrote LAN driver now want to install
Date: Fri, 23 Mar 2001 00:06:11 GMT
Hi. I'm new at Linux LAN driver writing and I have found the ne2k-pci.c
module, modified it for my hw and now I just need to know if there is a
standard way to install it. I've written so much Windows junk, I'm thinking
in INF file terms. Is there something like that with Linux, or do I just
tar it up and distribute it? Forgive me for my ignorance, but I only have
half a brain, and it almost full of Windows crap.
((&-<
------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: How to Kill "unkillable" process
Date: Fri, 23 Mar 2001 00:12:53 GMT
In article <uPvu6.173$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
>Martin Collins <[EMAIL PROTECTED]> wrote:
>: just a comment. This behaviour seems a little strange. Issuing a kill -9
>: shouldn't result
>: in the process being signaled. It should just be wiped by the kernel. After
>: all SIGKILL is
>: not supposed to be "catchable" at all.
>
>What about a zombie process? IIRC, wouldn't it show up in the ps list,
>but not really be kill-able?
[-]
Call the Vatican.
Okay, zombie's are not real processes anymore anyway as they're dead but
a zombie is "only" an entry in the systems process table. Since the
systems process table is a limited resource zombies can become a problem
once there're too many of them.
Just like in everyday life, yes 8)
You basically may end up with not being able to start anything anymore,
not even shutdown 8-/
Juergen
--
\ Real name : Juergen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
From: Bernd Strieder <[EMAIL PROTECTED]>
Subject: Re: C++ and shell
Date: Fri, 23 Mar 2001 01:21:52 +0100
FLD wrote:
>
> I'm making a GUI for a command line tool i often use. til now i've used
> the "system" command which works fine, but i'm now interested in getting
> the tool output (text) in my program. How can i make it work ?
>
> FLD
Look in the info documentation of glibc, there are examples how to use
fork(), popen(), exec(). There also is an example howto roll your own
system()-function. I think it's the top-level sections "Processes" and
"pipes and FIFOs" in libc.info. This should give a start. I've no code
around to post, sorry. You should find examples in basic level Unix
system programming books, too. It's a common task. If you have an app
that does it, look into its sources.
Bernd Strieder
------------------------------
From: "He Jin" <[EMAIL PROTECTED]>
Subject: Re: HowTo:Retrieve a list of structures in kernel
Date: Fri, 23 Mar 2001 09:01:39 +0800
Just allocate enough memory in user space and transport the pointer into
kernel
with IOCTL. Although the link-list structures seem to be an structure array
in
user space, you can get them in one time at all. :) Indeed,it doesn't look
like a
good idea, but maybe it works.
"Hoa Do" <[EMAIL PROTECTED]> wrote in message
news:99dtn9$6jj$[EMAIL PROTECTED]...
> Hello,
>
> I have a link-list of structures in the Linux kernel. I want to retrieve
> this list of structures to a user space program. Do you know how I can
> achieve this ?
>
> From user space program, I can retrieve a single structure via IOCTL(..)
> call. But I don't know how to retrieve the whole list with a single
IOCTL()
> call.
>
> Any help would be appreciated.
> Thanks,
> HD
>
>
>
>
------------------------------
From: [EMAIL PROTECTED] (Pjtg0707)
Subject: Re: Wannabe -- Wrote LAN driver now want to install
Date: Fri, 23 Mar 2001 01:01:35 -0000
Reply-To: [EMAIL PROTECTED]
On Fri, 23 Mar 2001 00:06:11 GMT, QuasiCodo <[EMAIL PROTECTED]> wrote:
>Hi. I'm new at Linux LAN driver writing and I have found the ne2k-pci.c
>module, modified it for my hw and now I just need to know if there is a
>standard way to install it. I've written so much Windows junk, I'm thinking
>in INF file terms. Is there something like that with Linux, or do I just
>tar it up and distribute it? Forgive me for my ignorance, but I only have
>half a brain, and it almost full of Windows crap.
>
>((&-<
>
>
Are you saying you need to load the driver? Try 'man insmod' at
the prompt for syntax.
------------------------------
From: "Victor" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development.apps,comp.os.linux.networking
Subject: Too many open files error
Date: Fri, 23 Mar 2001 10:12:30 +0800
Reply-To: "Victor" <[EMAIL PROTECTED]>
Hi, all
we encountered a problem that the system always report :
"error in loading shared libraries: libxxxx.so.2: cannot open shared object
file: Error 23"
or
"socket: Too many open files in system"
whatever I want to do. I heard this is caused by the exhaustion of the
system file descriptor.
But how can I fixed this problem? The key point is that I can't do anything
on that machince
now!
E-mail: [EMAIL PROTECTED]
------------------------------
From: Gaurav Navlakha <[EMAIL PROTECTED]>
Subject: Synchronous/Asynchronous Signals
Date: Thu, 22 Mar 2001 20:43:36 -0600
Hi,
I have a basic question on signals:
Is SIGALRM considered a "synchronous" signal, or an "asynchronous" signal?
Fo eg. SIGPIPE (floating point error) occurs soon after (synchronized
with) the occurrence of a fp error, so it is synchronous (occuring 'within
the program'). SIGINT (from the Ctrl-C on terminal) occurs externally, so
it is asynchronous.
So now, if a select() timer generated SIGALRM occurs, is it synchronous or
asynchronous?
The reason I'm asking this is that the man page for "pthread_sigmask" on
Sun Sparc machines, says the following:
"
Signals which are generated synchronously should not be
masked. If such a signal is blocked and delivered, the
receiving process is killed.
A thread directed SIGALRM generated because of a realtime
interval timer or process alarm clock is not maskable by a
signal masking function, such as thr_sigsetmask(3T), or
sigprocmask(2). See alarm(2) and setitimer(2).
"
In general, are SIGINT and SIGKILL the only asynchronous signals?
Thanks for your help,
Sincerely,
Gaurav.
------------------------------
From: [EMAIL PROTECTED] (Nick Andrew)
Subject: Re: How to Kill "unkillable" process
Date: 23 Mar 2001 13:56:37 +1100
Josef Moellers <[EMAIL PROTECTED]> writes:
>unless of course the task's state is not TASK_INTERRUPTABLE:
>(from signal.c:)
> if (t->state =3D=3D TASK_INTERRUPTIBLE && signal_pending(t))
> wake_up_process(t);
>Tasks get their state set to TASK_UNINTERRUPTIBLE when they sleep_on().
For tasks in 'D' state which get a SIGKILL is it reasonable to
wake them up anyway? They're just going to die from the do_exit().
Or will that leave the kernel in an undefined state?.
I get vaguely annoyed by having (say) some disk error or a tape driver
error and a process in 'D' state which can't be killed because the driver
is off in laa-laa land. Usually it's not a problem, because the process
isn't going anywhere anytime soon, but if the process happened to hold
a few resources like open FDs or a large quantity of memory, it might
affect other things.
Nick.
--
Pacific Internet SP4 http://www.zeta.org.au/~nick/
------------------------------
From: [EMAIL PROTECTED] (Nick Andrew)
Subject: Re: How to Kill "unkillable" process
Date: 23 Mar 2001 13:58:13 +1100
[EMAIL PROTECTED] writes:
>What about a zombie process? IIRC, wouldn't it show up in the ps list,
>but not really be kill-able?
A zombie is already dead, so it can't be killed. A zombie does show up
in the process list because it occupies a process table slot but no
other resources (no memory, no open files, etc...)
Nick.
--
Pacific Internet SP4 http://www.zeta.org.au/~nick/
------------------------------
Crossposted-To: comp.os.linux,comp.os.linux.development.apps,comp.os.linux.networking
From: [EMAIL PROTECTED] (Andrei Ivanov)
Subject: Re: Too many open files error
Date: Fri, 23 Mar 2001 00:52:19 GMT
In comp.os.linux.networking Victor <[EMAIL PROTECTED]> wrote:
> we encountered a problem that the system always report :
>
> "error in loading shared libraries: libxxxx.so.2: cannot open shared object
> file: Error 23"
> or
> "socket: Too many open files in system"
>
> whatever I want to do. I heard this is caused by the exhaustion of the
> system file descriptor.
> But how can I fixed this problem? The key point is that I can't do anything
> on that machince
> now!
If you can as root do the following you're lucky one :-)
# s=`expr \`cat /proc/sys/fs/file-max\` \* 2`; echo $s > /proc/sys/fs/file-max
--
andrei
------------------------------
From: "He Jin" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Too many open files error
Date: Fri, 23 Mar 2001 11:35:41 +0800
if this problem is really caused by the exhausition of the system file
descriptor, you can increase it by changing the value of NR_OPEN and
NR_FILE macro in /usr/include/linux/fs.h, and then reconstruct the kernel.
Cheers, :)
"Victor" <[EMAIL PROTECTED]> wrote in message
news:99ec63$2ga$[EMAIL PROTECTED]...
> Hi, all
>
> we encountered a problem that the system always report :
>
> "error in loading shared libraries: libxxxx.so.2: cannot open shared
object
> file: Error 23"
> or
> "socket: Too many open files in system"
>
> whatever I want to do. I heard this is caused by the exhaustion of the
> system file descriptor.
> But how can I fixed this problem? The key point is that I can't do
anything
> on that machince
> now!
>
> E-mail: [EMAIL PROTECTED]
>
>
>
------------------------------
From: "QuasiCodo" <[EMAIL PROTECTED]>
Subject: Re: Wannabe -- Wrote LAN driver now want to install
Date: Fri, 23 Mar 2001 03:37:50 GMT
Yeah, I know that I can load it with insmod, but isn't there some kind of
install program I can write for the novice Linux user? Since I am little
more than a novice with Linux myself, I need to learn the ins and outs of
device installation.
"Pjtg0707" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Fri, 23 Mar 2001 00:06:11 GMT, QuasiCodo <[EMAIL PROTECTED]> wrote:
> >Hi. I'm new at Linux LAN driver writing and I have found the ne2k-pci.c
> >module, modified it for my hw and now I just need to know if there is a
> >standard way to install it. I've written so much Windows junk, I'm
thinking
> >in INF file terms. Is there something like that with Linux, or do I just
> >tar it up and distribute it? Forgive me for my ignorance, but I only
have
> >half a brain, and it almost full of Windows crap.
> >
> >((&-<
> >
> >
>
> Are you saying you need to load the driver? Try 'man insmod' at
> the prompt for syntax.
>
------------------------------
From: "Victor" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Too many open files error
Date: Fri, 23 Mar 2001 11:58:32 +0800
Reply-To: "Victor" <[EMAIL PROTECTED]>
Seems I'm not the lucky one. :-(
Whatever I do, it always report those errors. And the machine is in another
city!
Any other ideas?
--
E-mail: [EMAIL PROTECTED]
"Andrei Ivanov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> In comp.os.linux.networking Victor <[EMAIL PROTECTED]> wrote:
> > we encountered a problem that the system always report :
> >
> > "error in loading shared libraries: libxxxx.so.2: cannot open shared
object
> > file: Error 23"
> > or
> > "socket: Too many open files in system"
> >
> > whatever I want to do. I heard this is caused by the exhaustion of the
> > system file descriptor.
> > But how can I fixed this problem? The key point is that I can't do
anything
> > on that machince
> > now!
>
> If you can as root do the following you're lucky one :-)
>
> # s=`expr \`cat /proc/sys/fs/file-max\` \* 2`; echo $s >
/proc/sys/fs/file-max
>
> --
> andrei
------------------------------
From: Kiran <[EMAIL PROTECTED]>
Subject: Re: Q: adding a syscall
Date: Fri, 23 Mar 2001 10:05:50 +0530
Holger Eitzenberger wrote:
> Hi there.
>
> I want to add a syscall to the kernel (2.4.2) and haven't found
> appropriate documentation for it. Help me save some time
> figuring it out.
>
> Thanks in advance.
>
> Holger
>
I've found this article by Micheal K Johnsom to be useful
http://www2.linuxjournal.com/lj-issues/issue17/1145.html
HTH
K
------------------------------
From: "Moe" <[EMAIL PROTECTED]>
Subject: bootsector
Date: Fri, 23 Mar 2001 05:24:25 GMT
I tried putting image into bootsector by:
$dd if=boot1 of=/dev/fd0 bs=1k conv=sync
It didn't work and distroyed fs. I formated floppy then same story.
Am I something wrong, or I got two bad floppies?
(Boot1 is less than 8k)
------------------------------
From: "Meg Chan" <[EMAIL PROTECTED]>
Subject: Redirect boot.msg
Date: Fri, 23 Mar 2001 06:59:33 +0100
How can i redirect the output on system startup (which is saved to boot.msg)
from tty0 to ttyS0? I'm using a serial terminal and want to see all the boot
messages on it. Adding the "console" parameter to lilo only causes to print
"Loading linux........" on ttyS0. But i want to get the rest there too.
------------------------------
From: Joerg Schmitz-Linneweber <[EMAIL PROTECTED]>
Subject: Re: linux floopy distro
Date: Fri, 23 Mar 2001 08:17:34 +0100
Hi!
Serkan Zeren wrote:
> i want to make my linux floppy distro.But i need some helps.Where can i
> find good sources about floppy distros.
You may find some hints at the link page from
http://www.embedded.linuxjournal.com or try to google for "Tom's rescue
disk/system" or TinyLinux or look at the tools at
http://www.opensource.lineo.com
HTH and Salut,
J�rg
--
J�rg Schmitz-Linneweber
mailto:[EMAIL PROTECTED]
ASTON GmbH, Ruhrorter Stra�e 9, 46049 Oberhausen, Germany
Tel. +49 (208) 6201930, FAX +49 (208) 6201950,
http://www.aston-technologie.de
------------------------------
From: Joerg Schmitz-Linneweber <[EMAIL PROTECTED]>
Subject: Re: Q: adding a syscall
Date: Fri, 23 Mar 2001 08:19:59 +0100
Moin!
Holger Eitzenberger wrote:
> I want to add a syscall to the kernel (2.4.2) and haven't found
> appropriate documentation for it. Help me save some time
> figuring it out.
The book from Alessandro Rubini is also very good for the details of
kernel/driver programming: "Linux device drivers" (also avail. in german).
But beware, its mostly written with 2.0 in mind (but form me it works for
2.4 too).
Salut, J�rg
--
J�rg Schmitz-Linneweber
mailto:[EMAIL PROTECTED]
ASTON GmbH, Ruhrorter Stra�e 9, 46049 Oberhausen, Germany
Tel. +49 (208) 6201930, FAX +49 (208) 6201950,
http://www.aston-technologie.de
------------------------------
From: Rolf Magnus <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.security
Subject: Re: Bypassing login prompt?
Date: Fri, 23 Mar 2001 08:28:25 +0100
Norm Dresner wrote:
> An autologin facility exists in SGI's IRIX. Does something like that
> exist in Linux?
For graphical login, you can use kdm, it can do this.
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: bootsector
Date: 23 Mar 2001 07:47:53 GMT
On Fri, 23 Mar 2001 05:24:25 GMT, Moe <[EMAIL PROTECTED]> wrote:
>I tried putting image into bootsector by:
>$dd if=boot1 of=/dev/fd0 bs=1k conv=sync
>It didn't work and distroyed fs. I formated floppy then same story.
>Am I something wrong, or I got two bad floppies?
>(Boot1 is less than 8k)
>
Yes, doen't do that. The boot sector of a floppy disk is an integral
part of the file system, and of you overwrite this the floppy file
system is destroyed. An exception is if you have ext2fs file system
on your floppy. Another exception is if you intend to copy the entire
kernel file to the floppy, in which case the floppy no longer has a file
system, just a bootable kernel.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: How to Kill "unkillable" process
Date: 23 Mar 2001 07:57:13 GMT
On 23 Mar 2001 13:56:37 +1100, Nick Andrew <[EMAIL PROTECTED]> wrote:
>Josef Moellers <[EMAIL PROTECTED]> writes:
>
>>unless of course the task's state is not TASK_INTERRUPTABLE:
>>(from signal.c:)
>> if (t->state =3D=3D TASK_INTERRUPTIBLE && signal_pending(t))
>> wake_up_process(t);
>
>>Tasks get their state set to TASK_UNINTERRUPTIBLE when they sleep_on().
>
>For tasks in 'D' state which get a SIGKILL is it reasonable to
>wake them up anyway? They're just going to die from the do_exit().
>Or will that leave the kernel in an undefined state?.
>
That is exactly it. For what is supposed to be very short sleep in
the kernel, the kernel device can choose to make the sleep uninterruptible
so it would never have to clean up after catching a signal and before
allowing the process to procede to the exit processing. In some cases
the clean-up required can be quite complex, and the problem is often
better handled by a timeout at a lowere level in the kernel, which will
limit the time a device driver is allowed to sleep. However, if a
process is uniterruptibly sleeping while a tape device is rewinding
is probabaly too long.
Another source of uninterruptibly sleep is NFS access while the server is
down. This is considered necessary to ensure NFS file system integrity,
and can be bypassed by soft-mounting the file system.
Villy
------------------------------
** 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
******************************