Linux-Development-Sys Digest #409, Volume #6 Thu, 18 Feb 99 00:14:03 EST
Contents:
Re: What's the Linux Lab? WAS Re: C Programming for ISA Card (Mike Mangan)
Re: What's the Linux Lab? WAS Re: C Programming for ISA Card ("G. Pollack")
Porting SVR4 code to Linux ("Jorge Fernandes")
Re: cold.apps or cold.system for libraries? (Phil Howard)
Re: 2.2.1: strange SMP (dual celeron) startup msgs (Paul Rubin)
Re: Linux and MSDOS partitions (Karl Heyes)
Re: Bug in select? Behavior changes midstream (Alan Curry)
Bug in select? Behavior changes midstream (Felix Morley Finch)
Number of file descriptors per process (Yair Halevi)
Re: Linux programming jobs? (Psophos)
Re: __setfpucw disappeared from glibc (Tom Herman)
Re: Porting SVR4 code to Linux (Douglas Jerome)
2.2.1: Can't run ZMAGIC off NFS ??? (Evgeny Stambulchik)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Mike Mangan)
Crossposted-To:
alt.os.linux,comp.os.linux.hardware,comp.os.linux.misc,linux.dev.c-programming,linux.dev.serial
Subject: Re: What's the Linux Lab? WAS Re: C Programming for ISA Card
Date: Wed, 17 Feb 1999 15:35:23 -0600
opps, i forgot to include it. the URL for the Linux Lab Project is:
http://www.llp.fu-berlin.de/
-mike
In article <01be5a7d$cdf6ada0$8aea689b@w784749>, "Norm Dresner"
<[EMAIL PROTECTED]> wrote:
> Does anyone have a URL for the "linux lab" project?
> Thanks
> Norm
>
> Mike Mangan <[EMAIL PROTECTED]> wrote in article
> <[EMAIL PROTECTED]>...
> > try the linux lab project.
> > good luck.
> > -mike
> >
------------------------------
From: "G. Pollack" <[EMAIL PROTECTED]>
Crossposted-To:
alt.os.linux,comp.os.linux.hardware,comp.os.linux.misc,linux.dev.c-programming,linux.dev.serial
Subject: Re: What's the Linux Lab? WAS Re: C Programming for ISA Card
Date: Wed, 17 Feb 1999 12:14:36 -0500
Norm Dresner wrote:
>
> Does anyone have a URL for the "linux lab" project?
> Thanks
> Norm
>
> Mike Mangan <[EMAIL PROTECTED]> wrote in article
> <[EMAIL PROTECTED]>...
> > try the linux lab project.
> > good luck.
> > -mike
> >
htp://www.llp.fu-berlin.de
--
Gerald Pollack
Dept. of Biology, McGill University
------------------------------
From: "Jorge Fernandes" <[EMAIL PROTECTED]>
Subject: Porting SVR4 code to Linux
Date: Wed, 17 Feb 1999 17:50:31 -0000
Hi. I have a program that compiles on a SYR4 machine using the libsocket.o
library. It's something like:
cc -g -o ... sockets.o -lsocket -lnsl
Now, there is no sockets.o file on my Linux machine. and the libsocket.o and
libnsl.o are SVR4 libraries. The libnsl.o file exists, but I haven't found
libsocket.o anywhere.
Which library is equivalent on Linux? How should I chance the command line
in order to compile the program on Linux?
TIA
Jorge Fernandes
Lisbon, Portugal
------------------------------
From: [EMAIL PROTECTED] (Phil Howard)
Subject: Re: cold.apps or cold.system for libraries?
Crossposted-To: comp.os.linux.development.apps
Date: Wed, 17 Feb 1999 17:53:27 GMT
On Tue, 16 Feb 1999 20:53:37 +1100 Erik de Castro Lopo ([EMAIL PROTECTED]) wrote:
| I see colds as being for kernel level development (possibly including
| suid daemons etc). For libraries I would tend to use colda.
and...
On 17 Feb 1999 00:31:25 -0600 Peter Samuelson ([EMAIL PROTECTED]) wrote:
| .system is mostly for kernel issues, so libraries belong in .apps .
| The exception would be libc, since almost all user code (including
| other libraries) uses it as the interface to the kernel. Other
| exceptions might be things like libproc and liblvm, since they too
| provide interfaces to kernel functionality.
So I guess we can generalize this way. If the library is related to the
kernel in some reasonable way, such as providing interfaces into it, then
it would be appropriate in c.o.l.d.s, but otherwise in c.o.l.d.a. Would
a filesystem library, like libext2fs, be considered to be a kernel tool?
My guess is that it would fall wherever the system tools would, and for
them, it would seem to be in c.o.l.d.s. Aside from issues related to ld.so,
it would seem most all libraries would be in c.o.l.d.a.
--
-- *-----------------------------* Phil Howard KA9WGN * --
-- | Inturnet, Inc. | Director of Internet Services | --
-- | Business Internet Solutions | eng at intur.net | --
-- *-----------------------------* phil at intur.net * --
------------------------------
From: [EMAIL PROTECTED] (Paul Rubin)
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Date: Thu, 18 Feb 1999 01:40:40 GMT
In article <7ac1hf$dd0$[EMAIL PROTECTED]>, BL <no.spambots.please> wrote:
>Marc Elvery <[EMAIL PROTECTED]> wrote:
>: as far as i know, smp is not supported at all with celeron's not under
>: win-nt not under linux,
>: you should have bought normal pentium-II's
>
>hey man, have you actually READ my posting? get a clue - you CAN modify the
>chips so they work. mendocino is mendocino - PERIOD.
>
>check out this link to educate yourself ;-)
>
> http://kikumaru.w-w.ne.jp/pc/celeron/index_e.html
>
>and btw, why would linux say I have 2 cpus if it didn't work? do you think I
>typed all this in myself and faked the console log? ;-)
So what's the outcome? Disregarding the confusing console log, does
the system work? How long does it take to do a kernel compile
compared to a single cpu? Enquiring minds...
------------------------------
From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Linux and MSDOS partitions
Date: Wed, 17 Feb 1999 17:51:14 -0500
Karsten Tinnefeld wrote:
> > Does anyone know if you can install and run Linux applications on a
> > mounted MSDOS partition mounted and viewable from Linux?
>
> Why not? A filesystem is a filesystem is a filesystem. Anyway, some
> applications might rely on long filenames or the possibility to create
> symbolic links. The first may be aided by using the partition as a VFAT
> fs. The second are lost.
>
As you said symlinks and long filenames. also
hard link counts, block/char devices and certain chars are not valid as
filenames,
eg + on DOS. INN news articles on 2gig DOS segment = lots of wasted space.
karl
------------------------------
Subject: Re: Bug in select? Behavior changes midstream
From: [EMAIL PROTECTED] (Alan Curry)
Date: Thu, 18 Feb 1999 01:52:22 GMT
In article <[EMAIL PROTECTED]>,
Felix Morley Finch <[EMAIL PROTECTED]> wrote:
>... [some slightly misinformed stuff about FIFOs]
If you haven't already, read the comp.unix.programmer FAQ You can get it
from rtfm.mit.edu along with all the other usenet FAQs in /pub/usenet.
Here's what's really happening with your test program. First you open the
FIFO RDONLY and NONBLOCK. That lets you get a read fd even though there is no
writer, which would normally not happen. Then you do your
'echo something > /tmp/fifo', which causes the following to open:
1. The shell forks a subprocess
2. The subprocess opens /tmp/fifo WRONLY on fd 1
3. The subprocess execs the "echo something"
4. Echo does a write() to fd 1
5. Echo exits, implicitly closing the WRONLY fd.
Now there are once again no writers on the FIFO. And here's the rule you
apparently weren't aware of: when a FIFO has no writers, an EOF condition is
placed on it. From now on, the FIFO will always be considered readable,
because its EOF has been reached. That's why you are reading 0 bytes. A 0
byte read is an EOF. The only way to reset it is to close all readers and do
your RDONLY open() again.
But you shouldn't do that, because there is a brief period of time between
when you detect the EOF and when you close the FIFO that some other writer
could show up and write something to the pipe. Then you'll close the reader
and that data will be lost.
Your solution of opening the reader in RDWR mode was almost certainly the
correct one.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
[EMAIL PROTECTED]|bigotries (should| [ | | ] / _> / _>
==============+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
From: [EMAIL PROTECTED] (Felix Morley Finch)
Subject: Bug in select? Behavior changes midstream
Date: 17 Feb 1999 16:32:33 GMT
I originally posted this to ...development.apps, but no response, so
I'm picking on the next level. :-)
I have a little test program here which opens two named pipes and
selects on them for read ready. If the pipes are opened read-write,
the select status means "read ready". If the pipes are opened
read-only, the status means "read ready" only until the first byte has
been read; from then on, the status means "won't block", and results
in no wait at all, and zillions of empty reads.
All the documentation I can find either states or implies that the
status should only be "read ready". Why does a read-only open change
this? What am I misunderstanding?
As a side question, this test program opens non-blocking because
opening a named pipe read-only does not return until there is a
writer. What is the reasoning behind this? If this is why select
returns "won't block" status, then why does it return "read ready"
status before the first byte has been read?
It's the difference in behavior before and after the first byte has
been read that puzzles me. I can understand either status, I'd just
be happier if it were consistent.
This is Linux kernel 2.0.33 / glibc 2.1 (mongrel 4 year old
Slackware), and 2.0.35 (Red Hat 5.1) (both stock 2.0.7 and 2.1).
================================
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <time.h>
#include <sys/time.h>
#include <fcntl.h>
#include <errno.h>
/* Select anomaly. Select on a named pipe opened read-only returns
"read ready" status until the first byte has been read. Afterwards
it returns "won't block" status. Select always returns "read
ready" status if opened for read-write. This opens two pipes and
shows the behavior as bytes are read. It terminates when a \n is
read on either pipe. */
char *(pipename [2]) = { "/tmp/tstpipe1", "/tmp/tstpipe2" };
int pipefd [2] = { -1, -1 };
fd_set pipefds;
int fdmax = 0;
int emptyReads [2] = { 0, 0 };
int lastEmpty = -1;
void
errexit (int pnum)
{
perror (pipename [pnum]);
exit (1);
}
void
openPipe (int ro) {
int pnum;
int flg = (ro ? O_RDONLY : O_RDWR) | O_NONBLOCK;
FD_ZERO (&pipefds);
for (pnum = 0; pnum < 2; pnum++) {
if ((mkfifo (pipename [pnum], 0622) < 0) ||
(pipefd [pnum] = open (pipename [pnum], flg)) < 0)
errexit (pnum);
FD_SET (pipefd [pnum], &pipefds);
if (pipefd [pnum] + 1 > fdmax)
fdmax = pipefd [pnum] + 1;
}
}
void
closePipe (void)
{
int pnum;
for (pnum = 0; pnum < 2; pnum++) {
if ((close (pipefd [pnum]) < 0) || (unlink (pipename [pnum]) < 0))
errexit (pnum);
FD_CLR (pipefd [pnum], &pipefds);
pipefd [pnum] = -1;
}
}
int
readPipe (int pnum)
{
char c;
int i;
if ((i = read (pipefd [pnum], &c, 1)) == 1) {
if (c == '\n')
return (1); /* Watch for eol */
if (emptyReads [0] || emptyReads [1]) {
emptyReads [0] = emptyReads [1] = 0;
printf ("\n"); /* Preserve the count display */
}
printf ("%s: %c\n", pipename [pnum], c);
return (0);
}
if ((i < 0) && ((errno != EAGAIN) && (errno != EWOULDBLOCK)))
errexit (pnum);
emptyReads [pnum]++;
printf ("Empty = %d %d\r", emptyReads [0], emptyReads [1]);
return (0);
}
void
sleepy (void)
{
while (1) {
fd_set fds;
int i;
fds = pipefds;
if ((i = select (fdmax, &fds, NULL, NULL, NULL)) <= 0) {
perror ("Select");
exit (1);
}
for (i = 0; i < 2; i++)
if (FD_ISSET (pipefd [i], &fds) && readPipe (i))
return; /* EOL received */
}
}
int
main (int argc, char *argv[])
{
int ro = -1;
if (argc == 2) {
if (argv [1] [0] == 'r')
ro = 1;
else if (argv [1] [0] == 'w')
ro = 0;
}
if (ro < 0) {
fprintf (stderr, "Usage:\n%s [r | w]\n o = open read-only\n n = open
read-write\n", argv [0]);
exit (1);
}
openPipe (ro);
printf ("Open for %s\n", ro ? "read-only" : "read-write");
printf ("Echo -n to %s or %s to terminate\n", pipename [0], pipename [1]);
printf ("Echo a new line to terminate\n");
sleepy ();
closePipe ();
if (emptyReads [0] || emptyReads [1])
printf ("\n"); /* Preserve the last count */
exit (0);
}
================================
--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / [EMAIL PROTECTED]
PGP = 91 B3 94 7C E9 E8 76 2D E1 63 51 AA A0 48 89 2F ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
------------------------------
From: Yair Halevi <[EMAIL PROTECTED]>
Subject: Number of file descriptors per process
Date: Thu, 18 Feb 1999 03:48:36 +0200
Hi.
I am using RedHat 5.2 with 2.0.36 kernel. There is a limit of 256 open
file
descriptors per process.
Does anyone know how to raise this limit (either some configuration
option
or kernel source changes)? I need to increase this limit substantially,
say to
4096 or so, assuming this is ok with the kernel.
Should there be some problem with this?
[EMAIL PROTECTED]
------------------------------
From: Psophos <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Linux programming jobs?
Date: Wed, 17 Feb 1999 18:32:30 +0000
Another tack if you get nowhere.
Work out how much $ you'd need to earn in 1 year just to survive (food,
rent, bills, etc.). This is almost certainly less than what
professionals will earn. Look for jobs in your area along the lines that
you want. Then try and talk to the people doing the hiring. Say you will
work for X for a year to get the experience.
Also. Get & install a copy of FreeBSD. That may help.
Something that may help more is to go to SUN's home page & join the
developer section. Part of that will allow you to obtain Solaris 7 (ver
2.7) for about $30. Install this (free for deveolpment of Software &
personal use) and learn to program it. It helps that this is a well
known commercial OS.
Good luck, I know what you're going through.
Me.
Bill Ripley wrote:
>
> 1. Don't get discouraged!
> 2 Keep at it. 20 applications or resumes is not all that many.
> 3 Apply even if you are not 100% qualified (degree, etc), they often advertise for
> the ideal candidate but will hire someone not as qualified when the ideal never
> appears.
>
> "Pavel V. Zaitesev" wrote:
>
> > Hello, fellow linux hackers.
> > I'm currently looking for work, that involves linux/unix programming, but
> > can find none. All jobs here require degree and /or 5-10 paid work
> > experience. I am a little upset now, because local authorities changing
> > law locally to allow programmer to work for more hours, but I couldn't
> > find a single job. Would the problem be:
> > 1. Bad resume
> > 2. looking in the worng places
> > 3. too dumb
> > I am 20 and abviously have no degree, nor any paid work experience.
> > I finished high school, I know linux/w95 well as well as C++, perl, Java,
> > Pascal, sh, bash. I know how to setup any kind of software. Able to
> > troubleshoot any software conflict. Currently I am working on a electronic
> > sales system.
> > Here in Victoria, BC. Canada, they are changing laws so that high tech
> > employees can work more, but I see no sign of shortage of computer
> > programmers. I applied at ~ 20 local places 2 interviews, one of them, was
> > promising, but no can do. It seems like many employers are arrogant.
> > I went to dice.com and hotjobs.com and they had few jobs, but most in the
> > states or other side of Canda(toronto). Most of them required degree or
> > large work experience periods. Should I even bother to apply?
> > What tactics should I use?
> > I do not know NT, but know Win32 programming. NT is way too expensive for
> > me, but I am willing to learn. Actually that where I concentrated my
> > efforts, to learn how to learn quickly...
> > So would you think that I should earn my money for education in Macs or
> > subway, or should I try harder? I am willing to move, but would company
> > pay for my relocation? I have no idea of how and where to look for
> > high-tech jobs. I wonder if you can give me any hints , like which way
> > should I direct my energy...
> > I posted to this group because most people here, may be working with linux
> > for a job.
> > Thank you for your time.
> > Pavel
> >
> > .*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~.*~
> > "Nobody has a right to complain about your own code, but you..."
> > -- Linus Torvalds http://victoria.tc.ca/~ws821
------------------------------
From: Tom Herman <[EMAIL PROTECTED]>
Subject: Re: __setfpucw disappeared from glibc
Reply-To: [EMAIL PROTECTED]
Date: Wed, 17 Feb 1999 17:48:38 GMT
Found it in /usr/i486_linuxlibc5/lib/libm.a !
I think the -lm option should do the trick.
I tried 'nm libname | grep fpu' on many other libs
looking for the symbol, but I guess I missed this directory.
Now I should be able to compile xtvscreen. Thanks!
Tom
--
Rob Komar wrote:
>
> Tom Herman ([EMAIL PROTECTED]) wrote:
> : I also have the same problem, only with __getfpucw.
> : Any ideas?
> :
>
> Take a look at:
>
> http://www.linuxsupportline.com/~billm/
>
> Cheers,
> Rob Komar
--
The views expressed are the author's and do not necessarily
reflect the official position of GTE or any of its subsidiaries
------------------------------
From: Douglas Jerome <[EMAIL PROTECTED]>
Subject: Re: Porting SVR4 code to Linux
Date: Wed, 17 Feb 1999 20:51:22 -0700
Jorge Fernandes wrote:
>
> Hi. I have a program that compiles on a SYR4 machine using the libsocket.o
> library. It's something like:
>
> cc -g -o ... sockets.o -lsocket -lnsl
>
> Now, there is no sockets.o file on my Linux machine. and the libsocket.o and
> libnsl.o are SVR4 libraries. The libnsl.o file exists, but I haven't found
> libsocket.o anywhere.
> Which library is equivalent on Linux? How should I chance the command line
> in order to compile the program on Linux?
>
> TIA
>
> Jorge Fernandes
> Lisbon, Portugal
Socket code is in libc; you don't need a replacement for -lsocket.
I don't know what the nsl thing is.
--
Douglas Jerome
------------------------------
From: [EMAIL PROTECTED] (Evgeny Stambulchik)
Subject: 2.2.1: Can't run ZMAGIC off NFS ???
Date: 17 Feb 1999 19:08:42 GMT
Hello,
After upgrading to 2.2.1 (from 2.0) I've noticed that it's impossible to
run old a.out ZMAGIC binaries off an NFS volume, but from a local FS is OK!
An example:
$ file /usr/local/bin/f90
/usr/local/bin/f90: Linux/i386 demand-paged executable (ZMAGIC), stripped
$ /usr/local/bin/f90
/usr/local/bin/f90: Exec format error. Wrong Architecture.
$ cp /usr/local/bin/f90 /tmp/
$ /tmp/f90
Usage: /tmp/f90 [option] ... file ...
ELF binaries, as well as QMAGIC and OMAGIC are fine.
Regards,
Evgeny
--
____________________________________________________________
/ Evgeny Stambulchik <[EMAIL PROTECTED]> \
/ Plasma Laboratory, Weizmann Institute of Science, Israel \ \
| Phone : (972)8-934-3610 == | == FAX : (972)8-934-3491 | |
| URL : http://plasma-gate.weizmann.ac.il/~fnevgeny/ | |
| Finger for PGP key >=====================================+ |
|______________________________________________________________|
------------------------------
** 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
******************************