Linux-Development-Sys Digest #832, Volume #7 Mon, 8 May 00 10:13:15 EDT
Contents:
Re: HELP PLEASSSSSSSSSSSSSSEEEE! (Anand Krishnamoorthy)
Re: Need to find my IP address ([EMAIL PROTECTED])
Re: Need to find my IP address ([EMAIL PROTECTED])
linux kernel 2.0.36 ([EMAIL PROTECTED])
Re: HELP PLEASSSSSSSSSSSSSSEEEE! (Mikko Rauhala)
Re: Need to find my IP address ("Christos Karayiannis")
rise amount of file descriptors (Ratz)
SINGAL FAILS !!! (David)
Re: Two really easy (I'm sure) questions (Eric)
Is it easier to build a network with linux than with windows? ("Paracool")
GPL-LGPL question (Andre Charbonneau)
Re: Is it easier to build a network with linux than with windows? (Josef Moellers)
----------------------------------------------------------------------------
From: Anand Krishnamoorthy <[EMAIL PROTECTED]>
Subject: Re: HELP PLEASSSSSSSSSSSSSSEEEE!
Date: Mon, 08 May 2000 15:17:29 -0400
==============E09BC1D07D6412F4CC54E361
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Just to correct you:
>> When I fork , I know that I am starting a new process. When I spwan
>> a thread, leaving the fact that it has the concept of shared
>> variables, is that the same as starting a new process. I read in a
>> book that both fork and spwaning use the same function clone().
>
Actually it is cloning which uses fork.. clone() is a special case of
fork()
Anand .K
[EMAIL PROTECTED]
>>
>>
>>
==============E09BC1D07D6412F4CC54E361
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Just to correct you:
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE TYPE=CITE><I>When I fork , I know that I am starting
a new process. When I spwan a thread, leaving the fact that it has the
concept of shared variables, is that the same as starting a new process.
I read in a book that both fork and spwaning use the same function
clone().</I></BLOCKQUOTE>
</BLOCKQUOTE>
Actually it is cloning which uses fork.. clone() is a special case of fork()
<P>Anand .K
<BR>[EMAIL PROTECTED]<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE TYPE=CITE><BR>
<BR>
<BR></BLOCKQUOTE>
</BLOCKQUOTE>
</HTML>
==============E09BC1D07D6412F4CC54E361==
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: 8 May 2000 01:57:33 -0700
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
>
>You don't seem to understand that having the source code is far better than
>having documentation. In the proprietary world, you need documentation simply
>because the source is not available, so people cling to the myth that
>documentation is essential. Documentation isn't for dummies, it's for people
>without source code. It's not an elitist assumption that developers can
>understand source code.
>
interesting discussion.
I think we need to be more clear what we mean by documentation.
There are in general two levels of documentation, one level that
describes the high level design of the program (architecture,
components interactions, main data flow etc..) and then, for
library type of software, a lower level of documentation that
describes the API as seen by the client of the library.
The first level is important to have, and can be in separate document.
In the open source world, I noticed that level of documentation
is somewhat lacking, although it is improving. I guess programmers usually
prefer to write code than to write documentation (I am one of those
weired programmers who enjoys writing doftware documentation as
much as coding :)
Yes, the API level of documentation, can be found by looking at
the code itself, but if you are going to do that, then the code
needs to be well documented as to the API. I've seen many code,
where there is no documentation at all that describe the function
calls. Not even a single line that describes what the function is
supposed to do.
There are also tools similar to javadoc (also for C/C++) that will
generate API docs from the source code automatically. May be
those can be used to help with this.
I happened to prefer to document the API first, in a separate document,
before the implementation, this way, the API is already documented
before I start coding. Of course, as one does more coding, the API
might have to change, and the API document, would need to remain in
sync with the code. But that was never a problem really, unless the boss
wants the code working first thing monday morning !
One advantage of having the documentation in the source code, is that
the documentation is not lost or separated from the code, this is
what a system like javadoc is the best of both world. You can have your
cake and eat it too ;)
Nasser
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: 8 May 2000 02:05:52 -0700
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
>Herein lies one of my biggest complaints about the Linux development
>environment: there should be no reason why an application programmer must
>rely on undocumented "catch-all" calls to accomplish simple tasks. The
>"man ioctl_list" page is a complete waste of time-- it's hopelessly out of
>date and only contains the argument type for each command without any
>explaination of where, why or how each should be used.
I agree that man pages need to be updated. The problem it seems that
it is hard to keep them in sync with the code development. It should
be the task of each programmer to make sure the man page is up-to-date
for their program/tool/command before making a new sw release. There should
be a defined process setup as to how to do this in the open source
world.
btw, does anyone use 'info' any more?
Nasser
------------------------------
From: [EMAIL PROTECTED]
Subject: linux kernel 2.0.36
Date: Mon, 08 May 2000 09:56:48 GMT
Hi all
Where can I get a 2.0.36 Linux kernel precompiled with SCSI support for
Adaptec AIC-7850 (module name is aic7xxx)
It should be on the SuSE 6.1 distribution but using this one the whole
system halts during boot phase right before starting the scsi module.
The last messages are:
linear personality registered
raid0 personality registered
============================
that's all
My other computer then proceeds with
raid1 personality registered
followed by the prompings of the scsi module
Can anybody give me a hint?
thanks
Irgei
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Mikko Rauhala)
Subject: Re: HELP PLEASSSSSSSSSSSSSSEEEE!
Date: 8 May 2000 10:06:57 GMT
Reply-To: [EMAIL PROTECTED]
On Mon, 08 May 2000 15:17:29 -0400, Anand Krishnamoorthy <[EMAIL PROTECTED]>
wrote:
>Actually it is cloning which uses fork.. clone() is a special case of
>fork()
Actually, it is fork() which uses clone(), clone() being the more generic
one of them and allowing the caller to specify what resources to share
and what not.
--
Mikko Rauhala - [EMAIL PROTECTED] - http://www.iki.fi/mjr/
------------------------------
From: "Christos Karayiannis" <[EMAIL PROTECTED]>
Subject: Re: Need to find my IP address
Date: Mon, 8 May 2000 14:36:19 +0300
> > > I used getsockname() as:
> > > if (getsockname(sock, (struct sockaddr *) &host, &addrlen) < 0 ) {
> > > perror("getsockname");
> > > exit(1);
> > > }
> > >
> > > printf("My port is %d\n", ntohs(host.sin_port));
> > > printf("My address is %s\n", inet_ntoa(host.sin_addr.s_addr));
> > >
> > >
> > > where host was of type struct sockaddr_in and
> > > addrlen of type int.
> > >
> > > Christos Karayiannis
Doug Schulz <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I have a sockets program an need to find the IP address of the machine
> the program is being run from so I can bind the socket to the correct
> address/port. I have tried using gethostname coupled with gethostbyname
> and I can only get 127.0.0.1 (localhost address). I want to find the
> actual IP address of the machine. Is there a way of doing this. Any
> help would be great.
>
> FYI this is a UDP app.
>
> Thanks,
>
> Doug
>
------------------------------
From: Ratz <[EMAIL PROTECTED]>
Subject: rise amount of file descriptors
Date: Mon, 08 May 2000 14:13:43 +0200
Hi
I need to raise the amount of file descriptors under kernel 2.2.x.
I tried to play with the sysctrl variables /proc/sys/fs/file-max,
/proc/sys/fs/file-nr but I can't get more than 4096 open file-
descriptors. I guess this is defined somewhere in the kernel sources
but I couldn't find it, nor am I sure if I'm looking at the right
place. Could someone be so kind to point me to the right source
or docu?
TIA,
ratz
------------------------------
From: David <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: SINGAL FAILS !!!
Date: Mon, 08 May 2000 14:55:33 +0200
This is a multi-part message in MIME format.
==============23A24375709CFDAB0CB22CA6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
HI,
I contacted you before, but now theme is diferent.
I am trying to use si_sigaction to obtain memory direction error, but it
doesnt work.
I have proved it into Solaris Sysyem and it works OK.
I pass you the short file:
sigaltstack.c
I install a signal handler and then I produce bad mem access. is_addr
says that I have access to 0x0 direction memory ALWAYS.
THANKS FOR YOUR TIME,
DTM
P.D.: Why a process can be defuncted afer an mprotect call is executed
??? (sigaltstack and signal handler are well installed. NO signal
appears (using strace...)). Mprotect, unprotect (PROT_NONE) a data code
(LEGAL data zone).
==============23A24375709CFDAB0CB22CA6
Content-Type: text/plain; charset=iso-8859-1;
name="sigaltstack.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="sigaltstack.c"
#include <stdio.h>
#include <signal.h>
void trat_segv ( int s , siginfo_t *si , void *extra ) // __attribute__ (=
( section( ".shared") ))
{
printf( "----SEGV -------------------\n" ) ;
printf( "SIGNAL_NUMBER: %d\n" , si -> si_signo ) ;
printf( "Errno value: %d\n" , si -> si_errno ) ;
printf( "Signal Code: %d\n" , si -> si_code ) ;
printf( "PID_T: %d\n" , si -> si_pid ) ;
printf( "UID_T: %d\n" , si -> si_uid ) ;
printf( "SI_STATUS: %d\n" , si -> si_status ) ; /* Exit value or signal=
*/
printf( "SIGNAL VALUE: %d\n" , si -> si_value ) ; /* Signal value */
printf( "SIGNAL INT: %d\n" , si -> si_int ) ; /* POSIX.1b signal */
printf( "SI_PTR: %d\n" , si -> si_ptr ) ; /* POSIX.1b signal */
printf( "SI_ADDR: %d\n" , si -> si_addr ) ; /* Maemory location which=
caused fault */
printf( "SI_BAND: %d\n" , si -> si_band ) ; /* Band event */
printf( "SI_FD: %d\n" , si -> si_fd ); /* File descriptor */ =
=
exit(0);
}
int main ( )
{
stack_t segv_stack ;
struct sigaction accion; =
segv_stack.ss_sp =3D (void *)malloc( SIGSTKSZ ) ;
segv_stack.ss_size =3D SIGSTKSZ ;
segv_stack.ss_flags =3D 0 ;
printf("Direcci=F3n baja de pila: %p, Direcci=F3n alta de pila: %p\n",
segv_stack.ss_sp, segv_stack.ss_sp+SIGSTKSZ);
if ( sigaltstack ( &segv_stack , 0 ) < 0 )
{
perror( "SIGALTKSTACK: " ) ;
printf( "ARGUMENTOS:\nSP: %p\nSIZE: %d\nFLAGS: %d\n" , =
segv_stack.ss_sp , segv_stack.ss_size , segv_stack.ss_flags=
) ;
return ;
}
=
accion.sa_sigaction =3D trat_segv ;
sigemptyset(&accion.sa_mask);
accion.sa_flags =3D SA_RESTART | SA_NOCLDSTOP | SA_ONSTACK | SA_SIGINFO=
;
sigaction(SIGSEGV, &accion, NULL);
{
int *a =3D (int *)0x1 ;
*a =3D 10 ;
}
return 0 ;
}
==============23A24375709CFDAB0CB22CA6==
------------------------------
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
From: Eric <[EMAIL PROTECTED]>
Subject: Re: Two really easy (I'm sure) questions
Date: Mon, 8 May 2000 11:45:58 GMT
Reply-To: [EMAIL PROTECTED]
Mark Graybill wrote:
>
> Alan Donovan wrote in message <[EMAIL PROTECTED]>...
> >Mark Graybill wrote:
> >
> >> Although I have participated in other OS development projects, I am
> >> new to Linux and have no experience with command shells.
> >
> >That explains it then. The Bourne shell (aka UNIX shell) is a complex
> >beast, but very (very) much more useful than the joke command-line
> >interpreter that comes with MS-DOS. People who confuse the two tend
> >think UNIX is a dinosaur,
>
> I agree with you about the shell, but not your blindly placing me in the
> category of people described above.
>
> DOS itself, is a joke - and always has been. There were real multi-tasking
> OS's that humiliated DOS when it made it's appearance (e.g. Convergent
> Technologies CTOS.)
>
> Unfortunately, many advanced operating systems fell by the way side because
> of their maker's marketing ineptitude.
>
> >when, as anyone proficient in shell will tell
> >you, there are few, if any, more expressive languages for both scripting
> >programs and interactive use.
>
> I agree with you in shell scriptings capabilities, but your experience with
> "languages for both scripting programs and interactive use" is obviously
> limited here (the mainframes have had scripting languages that puts shell in
> its place.)
>
> >It is also very important to understand the role of the shell in a UNIX
> >system if you want to make it as a programmer. Implicit in this is
> >understanding the difference between system and fork, and how file
> >redirection, command-line processing, job control, etc all work. Read a
> >good book or two on the design of UNIX.
>
> Keep in mind Linux is not really unix - it is not a direct decendant of
> unix. The following unix systems I've already studied and have experience
> with: AT&T 3B2 System V, AIX, HP-UX, SCO, BSD, OSF1, mach kernel, and IBM
> microkernel. What books would you recommend?
>
> >
> >> Since the underlying code is a shell, I wouldn't think it would be
> calling
> >> system calls for such things.
> >
> >The underlying code is not a shell. The command you are writing is
> >interpreted directly by the shell. It is the shell that parses "2>&1",
> >not gcc or make or anything else. What the shell does when it sees this
> >is to duplicate the output filedescriptor stdout (using the dup2()
> >system call) so that writes to stderr in the child program (gcc)
> >actually go to the same file as stdout. Note that the file can be a real
> >file (on disk), a pipe, a pseudofile (a device) or a terminal (where
> >unredirected stdout/err go). Depending on your command line, any of
> >these may be used.
> >
> >As Kaz said, 2>&1 is correct. 2<&1 is not, but it just happens to work
> >because dup'ing an fd for write is the same as dup'ing for read.
>
> You missed the "other OS development projects" above, didn't you? (I have
> no experience *developing* command line shells - it's not a statement of my
> experience using them.) Perhaps your assumptions are in error. :)
>
> BTW, I still have no technical explanation as to why. Just as Kaz couldn't
> tell me why it is bad practice to use void main() instead of int main().
> Some of this stems from frustration with recent graduates that have come
> into my projects who have ridiculously rigid do's and don'ts, and will not
> change - even if they hinder productivity. I had one graduate student
> graduate (sounds like chiasmus), who insisted it was "lazy" to use a task
> list to select the window of a desired running program, and would waste time
> clicking title bars to send windows to the back until she found the right
> one (I've watched her miss the one she wanted in succession, and start the
> process all over again, wasting time - especially mine.) These people were
> also not very good team players because of their egos and propensity to
> competition, and unwillingness to improve their skills - they hindered team
> dynamics. Team playing is a requirement in today's IT. The lack of being a
> good team player and willingness to improve your productivity are qualities
> used to weed out candidates.
>
> So these news threads are really manifestations of issues I have, where I am
> really trying to prove a point to programmers that are great computer
> scientists, but cling to practices they learned in school that they cannot
> ratify - and they hinder their growth as professionals. They aren't willing
> to let go of old dogma.
>
> I guess after 20 years, I've lost all the bulls#!t "do's and don'ts" my
> professors could never explain why. Based on what is real (and confidence
> in my own intelligence to discern what axioms are valid regardless of my
> professors' idioms), in the real world of commercial software engineering,
> I've developed my own set of do's and don'ts. I use void main() if it suits
> my purpose (especially in a test program), and I've used 2<&1 because it
> suited my purpose. If we should use 2>&1, tell us why. (I could really
> care less which one I use - actually I may even have remembered it
> incorrectly and it just happened to work this way when I tried it to verify
> it.)
>
> Again - please explain in technical terms WHY 2<&1 (and void main()) is
> incorrect. I'm looking for solid technical reasons - not ethical reasons.
I haven't followed the entire thread, so forgive me if I make a remark
that was made before.
void main() wouldn't be usable if you are interested in the succes of
you're program. Catching a program's return value (0 on success, else
failure) does require a return value.
>
> Or are all we are really doing is showing off? :)
>
> Thanks,
> Mark
------------------------------
From: "Paracool" <[EMAIL PROTECTED]>
Subject: Is it easier to build a network with linux than with windows?
Date: Mon, 08 May 2000 13:32:26 GMT
Is that right that linux has a better network system than windows? Can I
also address the speaking ports with linux? And what are the differences
between Suse, Lilo, normal Linux and Redhat? And are all versions for free?
------------------------------
Date: Mon, 08 May 2000 09:14:28 -0700
From: Andre Charbonneau <[EMAIL PROTECTED]>
Subject: GPL-LGPL question
Hi, just a quick question...
I've just written 2 libraries which are using STL and they are also
using programs that are GPL, can I still put these libraries LGPL ?
Thanks,
--
Andre Charbonneau
Software Engineer
Corel Corporation
728-0826 x5612
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Is it easier to build a network with linux than with windows?
Date: Mon, 08 May 2000 15:54:30 +0200
Paracool wrote:
> =
> Is that right that linux has a better network system than windows? Can =
I
> also address the speaking ports with linux?
If you refer to "speakers" (Lautsprecher), then, yes, you can use the
(more commercial oriented) OSS or the (more open source oriented) ALSA.
Usually the distributions already have sound support.
> And what are the differences
> between Suse, Lilo, normal Linux and Redhat? And are all versions for f=
ree?
SuSE and RedHat are two distributions. SuSE is more prominent in the
German speaking markets but also has a representative in the US while
RedHat is more prominent in the US but also has a representative in
Germany. The SuSE distribution currently consist of 6 CDs (6.4) with
lots of trial versions of commercial software while RedHat 6.2 still
fits on two CDs (binaries and source), but the "DeLuxe" and
"Professional" boxes also contain disks with other software.
Since combined, both are still less expensive than other OSes, and,
contrary to other licences, you can re-sell/-use/-giveaway the
distribution you don't like, you can always give both a try.
"normal Linux" does not exist. "Linux" by itself might only refer to the
kernel while SuSE, RedHat, Debian, Slackware etc all add tools,
installation scripts etc.
Lilo is the LInux LOader, a program suite used to boot Linux and other
OSes (you can set up a dual boot system keeping your old OS for thos
applications you don't want to miss).
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
** 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
******************************