Linux-Misc Digest #545, Volume #27 Fri, 6 Apr 01 15:13:03 EDT
Contents:
Re: Linux: fork()'ing in a Secondary Thread - Process Control In-General ("Nick
Knight")
Re: text editor (Floyd Davidson)
Re: text editor (Floyd Davidson)
suggestions needed about backup (ekk)
Re: Tips: Debian is very good (= (Michel Bardiaux)
Re: text editor (Floyd Davidson)
Re: suggestions needed about backup (Joshua Baker-LePain)
Re: log move (Stephen Rank)
Re: The Python is so powerful, easy to use? compared with C++ (Bob Hauck)
Re: text editor (Joeri Sebrechts)
Re: help with tomsrtbt ("ne...")
Re: Palm handheld as Linux terminal (Brian Hassard)
3d shooter running on 2 computers (Goophy)
----------------------------------------------------------------------------
From: "Nick Knight" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.programming.threads,comp.unix.programmer
Subject: Re: Linux: fork()'ing in a Secondary Thread - Process Control In-General
Date: Fri, 06 Apr 2001 13:06:12 -0400
In <9akblr$1j0o$[EMAIL PROTECTED]>, on 04/06/2001
at 04:09 PM, "Sergey Aranovsky" <[EMAIL PROTECTED]> said:
>Anyway, I'd suggest that you change 'ps -u nknight' tp 'ps -lu nknight'
>and analyze the output or post it here (please do it anyway -- it's
>short, your case seems to be interesting).
Again, thank for the input. As you suggested, I modified my internal 'ps'
command to add the -l parameter. In addition, and where it was really
more needed anyway, when I check from another window (after the program is
actually in a waiting state), I also used the -l param.
I WILL NOTE that, after hearing back from two people that "it works here",
I copied my binaries over to another Linux machine. They worked there,
too. So. Why is my super-dependable development machine having problems
with this seemingly simple code (and how many other machines might share
this problem)?
Here's the revised output. This is the screen after running my proctest
program. It will wait like this forever:
/home/nknight/ISL-3.6/baseset/gcc>./proctest
Before new thread:
forking ...
Waiting on PID: 4498
chaining ...
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME
CMD
000 S 504 26060 1 0 60 0 - 994 do_sel ? 00:00:00
xterm
000 S 504 26062 26060 0 60 0 - 519 read_c pts/0 00:00:00
bash
000 S 504 26314 1 0 60 0 - 992 do_sel ? 00:00:00
xterm
000 S 504 26316 26314 0 60 0 - 518 read_c pts/1 00:00:00
bash
000 T 504 31889 26316 0 60 0 - 292 do_sig pts/1 00:00:00
red
140 S 504 1157 685 0 60 0 - 991 do_sel ? 00:00:01
smbd
000 S 504 1162 1 0 61 0 - 999 do_sel ? 00:00:00
xterm
000 S 504 1164 1162 0 70 0 - 519 wait4 pts/4 00:00:00
bash
000 S 504 4453 1 0 60 0 - 991 do_sel ? 00:00:00
xterm
000 S 504 4455 4453 0 68 0 - 515 read_c pts/7 00:00:00
bash
000 S 504 4497 1164 0 70 0 - 511 wait4 pts/4 00:00:00
proctest
000 R 504 4498 4497 0 73 0 - 637 - pts/4 00:00:00 ps
status: 0
pt:pt
After thread start:
forking ...
getting char:
Waiting on PID: 4501
So, my program is now on waitpid(), waiting for process 4501 to terminate.
But that process is stuck in limbo. Fortunately, the new parameter to ps
gives another clue. I learn something new every day (thanks!). From
another window, I can get the following ps list:
/home/nknight>ps -lu nknight
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME
CMD
000 S 504 26060 1 0 60 0 - 994 do_sel ? 00:00:00
xterm
000 S 504 26062 26060 0 60 0 - 519 read_c pts/0 00:00:00
bash
000 S 504 26314 1 0 60 0 - 992 do_sel ? 00:00:00
xterm
000 S 504 26316 26314 0 60 0 - 518 read_c pts/1 00:00:00
bash
000 T 504 31889 26316 0 60 0 - 292 do_sig pts/1 00:00:00
red
140 S 504 1157 685 0 60 0 - 991 do_sel ? 00:00:01
smbd
000 S 504 1162 1 0 60 0 - 999 do_sel ? 00:00:00
xterm
000 S 504 1164 1162 0 65 0 - 519 wait4 pts/4 00:00:00
bash
000 R 504 4453 1 0 60 0 - 991 - ? 00:00:00
xterm
000 S 504 4455 4453 0 69 0 - 517 wait4 pts/7 00:00:00
bash
000 S 504 4497 1164 0 67 0 - 518 read_c pts/4 00:00:00
proctest
040 S 504 4499 4497 0 69 0 - 518 do_pol pts/4 00:00:00
proctest
040 S 504 4500 4499 0 69 0 - 518 wait4 pts/4 00:00:00
proctest
040 S 504 4501 4500 0 69 0 - 517 rt_sig pts/4 00:00:00
proctest
000 R 504 4506 4455 0 71 0 - 639 - pts/7 00:00:00 ps
I see that 4501 says something about "rt_sig". What's this mean and can
anyone guess to a probable cause?
I had thought that it might be a multiple processor issue. However, I'm
less confident of that since one of the fellows that it *did* work for has
the same kernel on a SMP box, too.
Any ideas?
Nick
--
===========================================================
Nick Knight <[EMAIL PROTECTED]> http://nick.secant.com
Senior Software Engineer
Secant Technologies, Inc. http://www.secant.com
===========================================================
------------------------------
From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: text editor
Date: 06 Apr 2001 07:25:18 -0800
[EMAIL PROTECTED] (Ralf Cirksena) wrote:
>Hi Floyd,
>
>On 2001-04-05 22:07 GMT, Floyd Davidson <[EMAIL PROTECTED]> wrote:
>
>> Yes indeed. It is absolutely necessary to use vi. You have to
>> configure Emacs, and vi is as good as anything to do that with.
>> After that, viva la Emacs... and throw vi away.
>
>Oh yes. Emacs is a great tool for customizing your vi configuration.
Vi isn't something that is configured, just suffered.
--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>
Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED]
------------------------------
From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: text editor
Date: 06 Apr 2001 07:26:15 -0800
[EMAIL PROTECTED] (Ralf Cirksena) wrote:
>Hi Grant,
>
>On 2001-04-06 05:44 GMT, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>> But seriously -- someday you _will_ need to know how to use vi
>> (or ed) to fix a password file or rc file on a system where the
>> other editors are not installed or not working. When that
>> happens, I can guarantee that the man pages won't be working
>> either, so it won't be a good time to try to learn...
>
>I just had to fix a passwd file on an old *IX system. But the
>emergency boot made no ed or vi available. I had to fix it with sed...
And that was a lot easier than using vi would have been!
--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>
Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED]
------------------------------
From: ekk <[EMAIL PROTECTED]>
Subject: suggestions needed about backup
Date: Fri, 06 Apr 2001 13:14:14 -0400
Hi-
I want to backup my data on a large hard drive I have. I want to use
tar, and the files can get very large - over 2 GB. I upgraded my kernel
to 2.4.2 so that I could have files this large on my ext2 partition.
I installed the latest versions of tar (1.13.19), gzip (1.3), bzip2
(1.0.1), and fileutils (4.0.43). All of which, supposedly, have large
file support (although, now I can't find where I saw that for
fileutils). Unfortunately, I am still having trouble - I can tar the
file up, but once it is tarred, I can't do anything with it.
For instance, I just created an approximately 6 GB tar file. I want to
see the file size:
[root@tornado hde]# ls -al
ls: test.tar: Value too large for defined data type
total 5
drwxr-xr-x 2 root root 4096 Apr 6 12:29 .
drwxr-xr-x 5 root root 1024 Apr 5 11:32 ..
Not too big of a deal, but I sure would like to compress it:
[root@tornado hde]# gzip test.tar
gzip: test.tar: Value too large for defined data type
Or how about bzip2 it:
[root@tornado hde]# bzip2 -z test.tar
bzip2: Input file test.tar is not a normal file.
Well, that's crazy, so how about simply untarring it?
[root@tornado hde]# tar xvf test.tar
tar: test.tar: Cannot open: Value too large for defined data type
tar: Error is not recoverable: exiting now
Obviously, this file is of no use to me! Does anyone have any ideas
about alternative options or packages I could be using??
Thank you
Ken
------------------------------
From: Michel Bardiaux <[EMAIL PROTECTED]>
Subject: Re: Tips: Debian is very good (=
Date: Fri, 06 Apr 2001 17:36:53 GMT
Michael Perry wrote:
> I noticed the recent glibc and gcc upgrades went pretty well all considered.
> Overall, as a perennial newbie at debian, the things I am impressed with now
> with unstable are that X4.0.2 upgrades are getting good,
Most of the times. My X config, which worked yesterday, now doesnt.
Complains 'no core pointer'. I've decided to take a few days to cool
down, or else I'm gonna bash something (as in 'bash troll'...)
> glibc is much
> better. I'll reserve judgement on perl until I see one :) I must have
> selective memory loss from my earlier adventures.
>
> I have done the lilo upgrade to 21.7 I believe. I don't boot the systems
> too often so I don't recall what version is running here. My laptop gets
> booted a lot more often and it seems to be at 2.17.
>
> I also have moved to testing from stable and I was overall satisfied. But
> this is fun now! As Mr. Hasler points out, I would not take my servers up
> there; but on the desktop with a system I can rebuild quite quickly thanks
> to things like rsync, unstable is pretty darned cool. All I can say about
> unstable is: "whee! bring it on!" :-)
I fell into unstable by accident. I needed (to install some stuff from
source) some recent versions of some packages, and they were only in
unstable. Using dpkg and managing the dependencies by hand was not
attractive, so I started dselect, and it upgraded a whole shitload of
packages. Now, how do I 'land' in testing? I mean, I would like to keep
in synch with 'testing', except I need some packages from 'unstable'
*and* I will accept unstable upgrades that are implied, but not unstable
for everything. How do I do those 2 things with dselect?
--
Michel Bardiaux
"As far as I can see all I see is C"
------------------------------
From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: text editor
Date: 06 Apr 2001 08:39:59 -0800
[EMAIL PROTECTED] (Martin Gregorie) wrote:
>On 05 Apr 2001 17:22:58 -0400, Dan Smith <[EMAIL PROTECTED]> wrote:
>
>>I vote for Emacs!!!
>
>MicroEmacs is probably more portable - release 4.00 is the only editor
>I've found that can be made to look and fee the same on vanilla
>Unices, Linux, DOS, Windoze and OS9/68K. Plus, you can configure its
>keystrokes via the termcap file.
I've used MicroEmacs for years, for just the above reason. It
works the same on so many platforms. 10-15 years ago that was
important to me, plus at that time GNU Emacs was just too big
for many of the smaller machines. MicroEmacs can't compete with
GNU Emacs or XEmacs today, but it's great for rescue disks.
I would actually recommend going back and getting a 3.8 or so
release of MicroEmacs though. (Not to mention there are about
40 major changes that need to be made to make is safe and more
useful.)
>However, like other folks say, you'd best learn to use vi first
>because its always there in any UNIX/Linux and you'll need it to
>configure a better editor.
I don't believe that actually learning vi is necessary unless you are
in the consulting business and must work on just about anybody's
machine without installing your own editor. But vi is definitely
useful to have around, and so is a book that tells how to use it
if one is ever stuck with that as the only option. However, I put
my own hacked up version of MicroEmacs on rescue disks, and can't
imagine the pain of being stuck without that.
--
Floyd L. Davidson <http://www.ptialaska.net/~floyd>
Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED]
------------------------------
From: Joshua Baker-LePain <[EMAIL PROTECTED]>
Subject: Re: suggestions needed about backup
Date: 6 Apr 2001 17:52:34 GMT
ekk <[EMAIL PROTECTED]> wrote:
> I want to backup my data on a large hard drive I have. I want to use
> tar, and the files can get very large - over 2 GB. I upgraded my kernel
> to 2.4.2 so that I could have files this large on my ext2 partition.
> I installed the latest versions of tar (1.13.19), gzip (1.3), bzip2
> (1.0.1), and fileutils (4.0.43). All of which, supposedly, have large
> file support (although, now I can't find where I saw that for
> fileutils). Unfortunately, I am still having trouble - I can tar the
> file up, but once it is tarred, I can't do anything with it.
You don't mention what distro you started out with, but I'm pretty sure
for any of this to work, glibc also has to have large file support compiled
in as well. I'm not sure which distros would work, but I *have* created
(and seen with 'ls -l') 9+GB files on RH7.0 (glibc 2.2) using kernel 2.4.3.
Of course, that was on an XFS partition...
OK, I just made a 2.5GB file on an ext2 partition on that box. No problem.
--
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University
------------------------------
From: Stephen Rank <[EMAIL PROTECTED]>
Subject: Re: log move
Date: 06 Apr 2001 19:01:12 +0100
Philip <[EMAIL PROTECTED]> writes:
> I was rotating a log file because it had grown very large and found that
> afterwards the log was not being written to any longer. I had to reboot
> to get the log to start recording again. Here are the steps which I
> followed.
Alternately:
/etc/init.d/sysklogd restart
Though the exact location and parameter may be distribution-dependent.
HTH,
Stephen
--
986579982
------------------------------
From: Bob Hauck <[EMAIL PROTECTED]>
Subject: Re: The Python is so powerful, easy to use? compared with C++
Reply-To: bob{at}codem[dot]com <>
Date: Fri, 06 Apr 2001 18:24:36 GMT
Joeri Sebrechts wrote:
> Bob Hauck wrote:
>> ... has the right set of built-in
>> types, comes with a very useful and high-level library and that it
>> has a very clear syntax. ...
>
> If that's what makes python better than C, then that must be what
> makes C++ better than C, because you can say those remarks for both
> python and C++.
C++ has "very clear syntax"??? I've been using it since 1993 or so an
I wouldn't say that! Yeah, you can get used to it, but that's not the
same thing. And it has the same set of built-in types as C, whereas
Python makes things like lists and strings a basic type.
C++ does finally have a decent library that patches over a lot of those
issues. I don't think it is as easy to use as Python's though, and it
still doesn't have a lot of the high-level functions like the config
parser, reading/writing URL's, GUI functions, etc. And the fact that
it is based on templates leads to a lot of interesting debugging
problems if you use them in unusual ways. But hey, we're here to be
language lawyers, not to get anything done.
>> C++ fixes many of the problems, but brings great complexity.
> I disagree. I've co-written a large project in C++, and although at
> first I believed it to be unbelievably complex (coming from a Delphi
> environment), later on I understood that everything is in there for a
> reason.
Yup, everything is there for a reason. The reasons are often internal
though. A lot of stuff in C++ came about because somebody wanted A,
but that caused problem B, so feature C was added to fix it. The
history of exceptions, destructors, templates, and many other features
followed this pattern. One thing leads to another and the simple "C
with classes" that was the original C++ idea has turned into the second
coming of Ada, only uglier and more terse.
Yet, somehow, simpler languages like Python and Java still give you the
tools you need to do the job. And because you can know the tool well
without devoting your life to it, you can be more productive. Also,
interpreters also make certain kinds of programming easier. For
instance it is pretty easy to generate code at run time, and then
execute it. This leads to different kinds of solutions than you get
with a compiled language.
> Nobody forces you to use ALL of C++ in one program.
I should hope not! I question whether anybody but Bjarne even
_understands_ all of the language.
> Ofcourse, knowing my luck I'm talking to a C++ veteran. But it's
> honestly my opinion. C++, when used correctly, is not complex at all.
C++ is complex. When you get familiar with it, it seems less so, but
that's just you climbing the learning curve, not the language getting
simpler. Just ask anybody who has worked on a C++ compiler if it is
complex.
I use C++ quite a bit. I've been using it for a long time. I used to
like it a lot because it was like C only with OO features. As more
features got added I started liking it less and started looking for
alternatives.
The bottom line is that I can get more done in less time with fewer
bugs using Python, even though I've been using it for a much shorter
time. There are lots of things that Python isn't very well suited for,
many of which happen to be part of my job description. However, for
the things it is suited for, it is easier to use and more productive
for me than C++.
C++ is a decent language for teams of experts to program large high
performance systems over a period of years. It is not very good for
small groups who want something done in the near future, and it sucks
bigtime for people whose main job isn't programming.
--
-| Bob Hauck
-| Codem Systems, Inc.
-| http://www.codem.com/
------------------------------
From: Joeri Sebrechts <[EMAIL PROTECTED]>
Subject: Re: text editor
Date: Fri, 06 Apr 2001 18:27:46 GMT
Martin Gregorie wrote:
> >I vote for Emacs!!!
>
> MicroEmacs is probably more portable - release 4.00 is the only editor
> I've found that can be made to look and fee the same on vanilla
> Unices, Linux, DOS, Windoze and OS9/68K. Plus, you can configure its
> keystrokes via the termcap file.
>
> However, like other folks say, you'd best learn to use vi first
> because its always there in any UNIX/Linux and you'll need it to
> configure a better editor.
If we're going to be promoting editors, then I vote for joe. Vi's too
small (and i keep typing while in the wrong mode, leading to the
frequent use of [ESC]:q!), emacs too big (and too awkward if you were
raised on Windows before you came to linux), but joe is just right. It
doesn't require a whole batch of libraries, so it's great for those
bootdisks too. And on top of that, you don't need a separate manual,
since it's completely self-documenting, AS EVERY APP SHOULD BE!
------------------------------
Crossposted-To: comp.os.linux.setup
From: "ne..." <[EMAIL PROTECTED]>
Subject: Re: help with tomsrtbt
Date: Fri, 06 Apr 2001 18:29:22 GMT
On Apr 6, 2001 at 10:59, Robert Davis eloquently wrote:
>I have a older computer at home and it doesnt work with tomsrtbt.
>It boots to the point where it is testing the nic card and then locks up.
>I believe it says something like 3c574 ... donald becker ....
>I have an old nic card. ne2000 compatible, isa, not pnp.
>How do I turn off the nic card detection?
Remove the olde card. I haven't used tomsrtbt so
I can't really say, but removing the nic should work.
>How do I detect it correctly?
The ne2000, you'll need the port and irq it uses and
pass that at the boot prompt to use it. But remember
tomsrtbt's kernel has to have support for it.
>Where is the correct place to post questions like this?
c.o.l.setup is. I've neva been to c.o.l.misc.
[...]
--
Registered Linux User # 125653 (http://counter.li.org)
Those who claim the dead never return to life haven't ever been around
here at quitting time.
2:22pm up 20 days, 14:21, 8 users, load average: 0.00, 0.00, 0.00
------------------------------
From: Brian Hassard <[EMAIL PROTECTED]>
Subject: Re: Palm handheld as Linux terminal
Date: Fri, 6 Apr 2001 14:39:04 -0400
Yes it can be done; here is how,
assuming an RH6.2 Linux system for the PC, and a Palm m100.
Step one is to enable logins from the serial port(s)
of the Linux machine.
Under RH6.2 for the PC, the serial ports (ttyS0, ttyS1, ..)
are not (by default) "enabled" for logins.
For the ports to accept logins, there must be
"mingetty"s actively looking at the ports.
If your system is using ttyS0 already
(perhaps for a serial mouse, or for a modem-
ttyS0 = com1, ttyS1 = com2)
change ttyS0 to ttyS1 in the following.
As "root" on your Linux system, edit the file
"/etc/inittab" and insert the line,
7:2345:respawn/sbin/mingetty ttyS0
just after the corresponding lines for tty1, tty2, .. tty6
Next, in order to allow "root" logins on ttyS0,
edit the file "/etc/securetty" and insert the line
ttyS0
just after the corresponding lines for tty1, tty2, .. tty6
After rebooting Linux, the serial port ttyS0 (com1)
should accept in logins, at the default settings
of 9600 baud, 8 bits, No parity, 1 stop bit.
Step two is to get a serial terminal program running on your Palm.
One that worked on my m100 is the demo version of "online"- see
http://www.markspace.com/online.html
Let's assume that the ".prc" file for "online" has been hotsynch'd
into the Palm, say by using Palm Desktop
http://www.palm.com/software/desktop/
The final step is to connect the Palm to the PC with the sync cable.
Start up the terminal program; make sure that the communication
settings have 9600 baud, 8 bits, No parity, 1 stop bit; these
happen to be the default settings of the program "online".
Go online with the terminal program (in "online", select the "On").
Give a carriage return (Grafitti "/" in the text area, or use
the on-screen keyboard "Enter" key)
There should be a "login:" prompt.
Brian
============================================================
On Sat, 24 Mar 2001, Rick wrote:
> Is it possible to use a Palm handheld as a terminal on a Linux
> machine?
>
> If so, how might I do this? I want to be able to log into my desktop and
> kill X when netscape or something else locks up X.
>
> Any and all help appreciated.
>
> --
> Rick
>
>
------------------------------
Crossposted-To:
de.comp.os.unix.linux.misc,alt.os.linux,alt.uu.comp.os.linux.questions,3dfx.linux.apps.games
Subject: 3d shooter running on 2 computers
From: [EMAIL PROTECTED] (Goophy)
Date: 06 Apr 2001 18:51:44 GMT
Hi
is it possible to start a 3d shooter (like Quake3) on a computer and
redirekt the output to another one?
I know, that this is possible with normal X-Applications and the xserver,
but I don't know in which way this will work with 3d-accelerated games.
J�rgen
--
*** email: make double 'l' single ***
------------------------------
** 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 comp.os.linux.misc.
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-Misc Digest
******************************