Subject: Linux-Development Digest #915
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Fri, 15 Jul 94 00:13:06 EDT

Linux-Development Digest #915, Volume #1         Fri, 15 Jul 94 00:13:06 EDT

Contents:
  Re: Bugs in 1.1.27 Makefiles (David Holland)
  Re: Starting New DIP (Rob Janssen)
  Wanted: Curseperl Binaries  (Heinz Morandell)
  Re: Returning free'd memory (Drew Eckhardt)
  Re: Quirky idea: Remote Virtual Consoles (David La Croix)
  Re: GETOPTS in BASH doesn't work! (Chet Ramey)
  Starting New DIP (Mike McLagan)
  Re: Using switch/case to jump into loops (Anthony W. Kay)
  Re: Why no AFS? (Peter Desnoyers)
  Re: Massive GCC error detected
  Re: Digi(something) intelligent serial driver? (Kevin Burtch)
  Re: Returning free'd memory (Brandon S. Allbery)
  Re: Linux Performance Enhance ? (Matthias Urlichs)
  Re: SB CD-ROM (Eberhard Moenkeberg)
  Re: What is this error? (Luke Howard)
  Re: What is this error? (Luke Howard)

----------------------------------------------------------------------------

Subject: Re: Bugs in 1.1.27 Makefiles
From: dholland@scws9.harvard.edu (David Holland)
Date: 13 Jul 94 18:38:57


mlord@bnr.ca's message of 13 Jul 1994 00:39:15 GMT said:

 > The 1.1.27 kernel has a few peculiarities in the Makefiles.
 > These will need fixing before it is ready for prime time..

In addition, it seems to compile a great deal that wasn't configured
in or otherwise unnecessary. I base this deduction on the fact that it
took some 50% longer to build 1.1.27 than 1.1.16. I don't have
specifics, unfortunately, as I didn't log the compile.

--
   - David A. Holland          | "The right to be heard does not automatically
     dholland@husc.harvard.edu |  include the right to be taken seriously."

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Starting New DIP
Reply-To: pe1chl@rabo.nl
Date: Thu, 14 Jul 1994 19:15:19 GMT

In <2vrftq$6dk@doorway.invlogic.com> mmclagan@homebase.linux.org (Mike McLagan) writes:

>   I'm going to start working on a new DIP.  (I need it for a specific purpose)
>and I'd like to gather ideas and specs from people.

I think it is a great idea to start a new DIP from scratch.
The current one has too many different versions and there are still lots
of problems reported.  You probably have to give it a different name to
get rid of all history and confusion...

Here are a few ideas...

- don't try to combine the dialin and dialout functionality.  the client
  is quite different from the server, and the attempt to combine them in
  one program has created confusion, difficult-to-understand code, and bugs.
  of course you can share some low-level functions.

- maybe you can use the dialout script capability from taylor uucp, at least
  for the dialling phase.  it is not the do-all-end-all of scripting
  languages, but it is available and has been debugged.  the multi-level
  structure of configuration files (sys/dialer/port) makes it easy to
  keep modem-dependent stuff away from the scripts for each system, and
  thereby support different modems.

- make sure you get the lockfile handling right.  using the taylor stuff
  makes this easier, as it already does locking.  the exact content of
  lockfiles is important to many programs, and it has been troublesome
  in many versions of DIP.

- it would be nice to have dial-on-demand, release-on-idle-timeout.
  I realize this is not entirely possible from within DIP, but it should
  be able to play the game.

- have a well-documented method to cleanly release the dialup connection.
  preferably one that also works when you have multiple slip links.

- make sure you can open the line no matter what state it was left in by
  the previous user.  this means opening in NDELAY mode, setting CLOCAL,
  then clearing the NDELAY mode.  CLOCAL should only be cleared after the
  entire connection script has completed and the line is about to be
  changed to SLIP/CSLIP/PPP mode.
  this is necessary to allow scripts that dial a number, enter username
  and password, then hangup to be called back.  the carrier will drop
  during the execution of this procedure and come back on later.

- be careful to setup the line and the controlling tty stuff in such a
  way that carrier drops are noticed (SIGHUP) and handled.
  it would be nice to have the option to re-try the connection when it
  has been established before and the carrier just drops unexpectedly.
  (i.e. the command to terminate the connection or the idle timeout were
  not the cause of the connection end)

Good luck with the project!

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

Crossposted-To: comp.os.linux.help
From: morandel@lotus.informatik.uni-stuttgart.de (Heinz Morandell)
Subject: Wanted: Curseperl Binaries 
Date: Thu, 14 Jul 1994 15:05:40 GMT



Has anybody on the net binaries of curseperl, or can I ftp them anywhere?
My computer isn't powerful enough to compile it.
Please give me a hint. 

-- 
Heinz Morandell         morandel@orchidee.informatik.uni-stuttgart.de

IfI Uni Stuttgart, Breitwiesenstr 20/22, D 7000 Stuttgart 80  
-- 
Heinz Morandell         morandel@orchidee.informatik.uni-stuttgart.de

IfI Uni Stuttgart, Breitwiesenstr 20/22, D 7000 Stuttgart 80  

------------------------------

From: drew@kinglear.cs.colorado.edu (Drew Eckhardt)
Subject: Re: Returning free'd memory
Date: 15 Jul 1994 00:22:00 GMT

In article <CsyA71.8Fo@pe1chl.ampr.org>, Rob Janssen <pe1chl@rabo.nl> wrote:
>In <graphix.774209621@spiff.cc.iastate.edu> graphix@iastate.edu (Kent A Vander Velden) writes:
>
>>Are there any planed changes to the Linux kernel to actually completely give 
>>the memory back to the system which was free'd by the program before the 
>>program exits?
>
>There are no changes needed in the Linux kernel for this.  It is a function
>(not) performed by the C libraries.

This isn't entirely accurate.  While it is definately possible for 
the user libraries to sbrk() and reduce the size of the data segment,
you can end up with things like

    a = malloc (20 * 1024 * 1024);
    b = malloc (16);
    free(a);

and your program will still be holding down an extra 20M.  In real life,
this would be starting a bunch of X applications which caused resources 
to be allocated in the X server which are essentially transient, another
which stayed on your desktop, and the transient applications terminating
after the permamant application started.

To deal with the situation optimally, you need to have some 
amount of malloc()/free() implemented in the kernel although
you want to avoid system call overhead for Many Small malloc()s.

I'd suggest implementing a general user alloc region(s) / free region(s)
call in the kernel.

Rather than using sbrk() when more memory was needed, malloc() could 
use the allocate region(s) call and allocate memory any where in 
the process's address space.  Depending on the pattern of malloc()s
detected, it could request a larger hunk than needed to avoid the 
overhead of multiple calls.

When a memory region was free, malloc would add it to an internal
list of freed regions, and perhaps after some threshold was reached
would call the free region(s) function to return the regions to 
Linux, which would unmap them from address space.

This insures that even if the process's memory space becomes fragmented,
nothing can force pages to remain allocated.  Unfortunately, it means that
malloc needs to be implemented differently and that applications which try
to determine their size or whatever based on the break value may fail.

-- 
Drew Eckhardt drew@Colorado.EDU
1970 Landcruiser FJ40 w/350 Chevy power
1982 Yamaha XV920J Virago

------------------------------

From: dlacroix@guilder.bevd.blacksburg.va.us (David La Croix)
Subject: Re: Quirky idea: Remote Virtual Consoles
Date: 14 Jul 1994 16:18:16 GMT

: >Jordan Hazen (jnh@kzin.cen.ufl.edu) wrote:

: I'd even favor straight serial connections and pty's too as it would be a 
: noticable increase in speed for thos specific remote apps.

: Later,
: JES
: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
: James B. MacLean                    jmaclean@fox.nstn.ns.ca
: Department of Education
: Nova Scotia, Canada (902) 424-8438

There is already a product that performs this function...  it is limited 
to text mode, but it does all of the terminal switching functions.

I believe that the most recent version is SCREEN 3.0.5 and I am pretty
sure it's somewhere on sunsite and all your other favorite servers

the keys aren't left-alt F1-8, but it's almost as simple.

however, it does not do any of the graphical stuff... 
all of the processing is done by the Server system (LINUX or other server)
and it will work over ANY log-in that is over a terminal that is smart
enough to run on something as stupid as a vt100 (maybe dumber terms too)

it's very easy to learn...  and might be a good starting point
for your programs.  (should you decide to start adding features)

--
dlacroix@guilder.bevd.blacksburg.va.us
dlacroix@vt.edu

------------------------------

From: chet@odin.INS.CWRU.Edu (Chet Ramey)
Subject: Re: GETOPTS in BASH doesn't work!
Date: 13 Jul 1994 20:40:45 GMT

In article <1994Jul13.191151.27517@sifon.cc.mcgill.ca>,
Kyle Dawkins <dawkins@sound.music.mcgill.ca> wrote:

>We have just installed Linux (0.9pl15+) on our 486/50 and are
>having some trouble getting shell scripts to run under bash or sh.
>It seems to have trouble with the "getopts" command. Actually,
>it seems that the getopts command does not exist, although the man pages
>for bash seem to think it does. No amount of testing and fiddling has come
>up with anything, and we definitely need a solution. Are we overlooking
>something with bash or is it a bug? If so, where can I get a newer release?

`getopts' is a configurable feature, though its inclusion is enabled by
default (and should not be turned off -- I really need to rethink the set
of configuration options).

The current bash version is 1.14.1.  It is available from prep.ai.mit.edu
and the normal GNU mirror sites as bash-1.14.1.tar.gz.  The canonical
URL is

ftp://prep.ai.mit.edu/pub/gnu/bash-1.14.1.tar.gz


-- 
"I believe every human has a finite number of heartbeats.  I don't intend
 to waste any of mine running around doing exercises." - Neil Armstrong

Chet Ramey, Case Western Reserve University     Internet: chet@po.CWRU.Edu

------------------------------

From: mmclagan@homebase.linux.org (Mike McLagan)
Subject: Starting New DIP
Date: 11 Jul 1994 13:02:50 GMT


Hi,

   I'm going to start working on a new DIP.  (I need it for a specific purpose)
and I'd like to gather ideas and specs from people.

   If you have any thoughts about features of DIP that would make it more 
usable for you, please let me know.  I'd like to draw up a spec for it within
the week or so.  I'll post the results here once I have it built.  

   Even the most mundane suggestion is welcome.  What do you want in the 
script language?  

   My own use is load balancing.  But I intend to support multiple slip lines
in 1 config file, and hopefully a single daemon on the slip server.  

   In addition to this, I'd like to gather together scripts from virtually any
service provider.  Please take out your account name and password, and email
it to me with a description of what's on the other end.  Server setups are also
welcome.  

   I'm sure it could be extended to cover PPP, or any other protocol that
ppl wanted.

   Mike was here...

Oh, please email your suggestions and such to dip@linux.org  :)

--
Mike.McLagan@Linux.Org, here to support the linux operating system,
and promote it's use worldwide.  

------------------------------

From: tkay@crl.com (Anthony W. Kay)
Subject: Re: Using switch/case to jump into loops
Date: 14 Jul 1994 19:17:12 -0700

The code:

   switch(var)
   {
      while()
      {

construction is a (while not well documented) supported feature. I have
even seen it in books on compiler design (One that comes to mind was
written by Allen Holub). 
In any structured language a goto is to be avoided, but if there is a
speed constraint (in an OS), or an issue of clarity, I see nothing wrong
with a goto. In this case, I feel the goto is better; Fast and clear.

------------------------------

From: peterd@morok.dev.cdx.mot.com (Peter Desnoyers)
Subject: Re: Why no AFS?
Date: Thu, 14 Jul 1994 14:43:43 GMT

yuri@shimari.cmf.nrl.navy.mil (Yuri Trifanov) writes:

>Given Transarc's agenda concerning DCE, and the accumulated cruft in
>the AFS work, it might be wiser to redesign a competing free
>product which incorporates some of AFS's better features.

I wonder if any of the Coda work (a follow-on project to AFS) is
available, or if CMU took the same approach of spinning off a
proprietary product with it.

                                Peter Desnoyers
-- 

------------------------------

From: grante@reddwarf.rosemount.com ()
Subject: Re: Massive GCC error detected
Date: Wed, 13 Jul 1994 16:25:37 GMT

Chris Worley (cworley@galena.use.com) wrote:

: gcc: internal compiler error: program cc1 got fatal signal 11

This is almost always a hardware error.  Probably bad cache hardware
or a bad SIMM.  Possibly bus contention or bus speed problems.

Try disabling your cache, if that doesn't fix it, try swapping SIMMS

--
Grant Edwards                                 |Yow!  Now I'm being
Rosemount Inc.                                |INVOLUNTARILY shuffled closer
                                              |to the CLAM DIP with the
grante@rosemount.com                          |BROKEN PLASTIC FORKS in it!!

------------------------------

From: kburtch@pts.mot.com (Kevin Burtch)
Subject: Re: Digi(something) intelligent serial driver?
Reply-To: kburtch@pts.mot.com
Date: Wed, 13 Jul 1994 21:26:21 GMT


Apparently I wasn't very clear in my first post, as I've had lots of potential
"buyers". Unfortunately I don't have any of these cards, I am just considering
buying them. I won't see the person selling them until the next local monthly 
computer swap meet. (in West Palm Beach) I will post as much information as I
can find on these cards next month when I can get the info. This time I'll get
the guy's phone number! :^)  A couple people have offered to take a shot at 
writing a driver for these boards if I can get the boards to them. 


Thanks for all the interest, I'll update you all as soon as I can.
---
              ______
Let me know  /\_,--|)
if you like / /    (     Kevin Burtch            ,,
Scorpions  |_|       ______________.__         ,///  My buddies include:
as pets.   \ \___,--'       ___ `----'S     ,-' // 1 Giant Asian Forest Scorp.
            \/___|__       / /\\/\ ,^ /\   /   //  1 Emperor Scorpion (Mom)
                    `-----/-/--\\|/--Y L,-|   '/  19 Emperor Scorpion babies
                         / /  /      \/__,----'    2 yet to be identified
                         ` `  `        `-            (caught in S. Florida)



------------------------------

From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: Returning free'd memory
Date: Fri, 15 Jul 1994 01:47:26 GMT

In article <304kr8$ain@csnews.cs.colorado.edu>, drew@kinglear.cs.colorado.edu (Drew Eckhardt) says:
+---------------
| I'd suggest implementing a general user alloc region(s) / free region(s)
| call in the kernel.
+------------->8

What's wrong with mmap/munmap on /dev/zero?

++Brandon
-- 
Brandon S. Allbery         kf8nh@44.70.4.88               bsa@kf8nh.wariat.org
Friends don't let friends load Windows NT (tnx Sun)    A Linux iBCS2 developer

------------------------------

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Linux Performance Enhance ?
Date: 14 Jul 1994 10:30:39 +0200

In comp.os.linux.development, article <CsvDLF.tv@pell.com>,
  orc@pell.com (Orc) writes:
> In article <CsuMMo.49F@pe1chl.ampr.org>, Rob Janssen <pe1chl@rabo.nl> wrote:
> >
> >Ok ok...  I admit that my piece of code was not the same as the original.
> >So here is a re-try.  It uses no goto at all, generates the same or better
> >code as Matthias's version, and it also uses a feature of the C language
> >that is not well-known...
> >
> >static int try_to_free_page(int priority)
> >{
> >   int i = 5;
> >   static int what = 0;
> >
> >   switch (what)
> >   {
> >       while (i--)
> >       {
> >       case 0:
> 
At least use a "do { } while(i--)" loop...  ;-)

>    You want to put a Duffs Device into the kernel?
>    Urk.
> 
There's no reasonable way to express what we want to do here in C without
either horrible goto usage (I _do_ admit that mich ;-), suboptimal machine
code, Duffs Device-like code, or (even less nice) replication of the loop.

>    BTW, I tried putting the original patch into my 1.1.18 kernel
> yesterday, and found some interesting behavior: when I loaded the
> machine to the point where it would swap, I'd see (16mb core) about
> 3 meg on swap while 7 meg remained used by buffers.

Makes sense, I'd say. Presumably, the buffers are in use and the three meg
on swap aren't. Or something like that.

-- 
May your name be so famous that every bailiff, bill collector,
constable, and police inspector knows it.
-- 
Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra_e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N|rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

------------------------------

Date: Tue, 12 Jul 1994 23:54:58 +0200
From: Eberhard_Moenkeberg@p27.rollo.central.de (Eberhard Moenkeberg)
Subject: Re: SB CD-ROM


Hello Boris Pitel and all others,

on 12.07.94 Boris Pitel wrote to All in USENET.COMP.OS.LINUX.DEVELOPMENT:

BP> I am learning UNIX pogramming on FreeBSD :)). What I am trying to do
BP> currently it is to write a driver for Sound Blaster CD-ROM.
BP> But the first barrier I met  on this way is to find any programming info
BP> on how to control CD-ROM part of the SB card.

BP> The only useful thing the Creative Labs. tech. support gave me is that
BP> LINUX already has this driver?

Boah, ey: did they really know about? ;-)

BP>    Now after long introduction, the question :
BP>    Can anybody point me to the sources of this driver ( I hope it doesn't
BP> sound like : "Give me your money, maan!"::)), or if it is not possible to
BP> the programming info about Sound Blaster CDROM.

Just get a recent Linux kernel (linux/drivers/block/sbpcd.c is your source,
last change was in 1.1.26).

BP>    Do you think that porting a CDROM driver from LINUX to FreeBSD will be
BP> easier then just to write a driver from the scatch?

Of course. I hope you find some bugs. ;-)

Possibly some people are already sitting on a FreeBSD port; you should
make a posting about your plans in an appropriate FreeBSD newsgroup, too.

Greetings ... Eberhard


------------------------------

From: lukeh@zola.apana.org.au (Luke Howard)
Subject: Re: What is this error?
Date: 14 Jul 1994 15:25:06 +1000

Lee J. Silverman (lee@netspace.students.brown.edu) wrote:

:       It looks like the 'clear' program that the BBS program calls
: is dynamically linked and the BBS uses chroot.  It isn't finding the
: shared library programs that it needs from /lib/.  One option is to
: make a directory called lib in the BBS directory, and copy the shared

Why not a hard link?

: library to this directory.  Another option is to recompile 'clear'
: statically linked, and put a copy of this executable in the BBS's
: directory.  The first option is probably easier.


luke
-- 

                      Luke Howard, Luke.Howard@apana.org.au
                   URL http://zola.apana.org.au/0/zola/people
                                Utilisez Linux!!!

------------------------------

From: lukeh@zola.apana.org.au (Luke Howard)
Subject: Re: What is this error?
Date: 14 Jul 1994 15:25:49 +1000

Riku Saikkonen (riku.saikkonen@compart.fi) wrote:
: >shared library programs that it needs from /lib/.  One option is to
: >make a directory called lib in the BBS directory, and copy the shared
: >library to this directory.  Another option is to recompile 'clear'

: Huh? How about a symlink? Takes much less disk space...

Won't work I don't think, a hard link should (does with my anon ftp server 
anyway)
-- 

                      Luke Howard, Luke.Howard@apana.org.au
                   URL http://zola.apana.org.au/0/zola/people
                                Utilisez Linux!!!

------------------------------


** 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: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
