Linux-Development-Sys Digest #76, Volume #7      Fri, 20 Aug 99 10:15:46 EDT

Contents:
  Re: Why not C++ (David Schwartz)
  Re: fork() question ([EMAIL PROTECTED])
  Re: Custon Device Drivers (David Schwartz)
  Re: most efficient way to zero out a partition? (Ronald Cole)
  Re: most efficient way to zero out a partition? (Juergen Heinzl)
  RE: Calling a BIOS interrupt ("overflow")
  Re: Why so inefficient source RPM's ?? (Peter Mutsaers)
  Re: CONFIGURE KERNEL VARIABLES ([EMAIL PROTECTED])
  Re: Linux file-size limit? ("Sascha Bohnenkamp")
  Lisp OSes (was: Re: Troll (was: why not C++?)) (Christopher B. Browne)
  Re: DRIVER for Toshiba DVD-RAM (only tested on kernel 2.0.36) (Christoph Martin)
  Re: LispOS? (Bill Gribble)
  Re: why not C++? (Paul D. Smith)

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

From: David Schwartz <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Why not C++
Date: Fri, 20 Aug 1999 00:26:39 -0700

Johan Kullstam wrote:
> 
> true enough.  however, mis- or dangerous- usage should be slightly
> more awkward than safe usage.  this is not so with C/C++.

        I think you are still asking for the impossible.

> it often takes more work to look at return values, errno and catch
> exceptions than it does to simply ignore them.

        It always takes more work to deal with something than to ignore it.

> in C the default
> handler is no handler at all.

        I'm not sure I follow you, but I don't think this has anything to do
with the language. In C, there is no notion of a 'handler', is there?

> C++ helps somewhat but i still find it
> a royal pain in the ass to check and handle everything.

        Yes, it is a royal pain in the ass to religiously check for everything
that might go wrong with everything that you do. _In_any_language_

        It seems to be reality that you are upset with, not any particular
language. :)

> i seem
> especially prone to extra calls to dtors for my classes.  many people
> (myself included) assume they have disk space and do not always check
> fwrite or putc.

        These things can all easily be solved if they bother you. If you don't
like fwrite or putc, don't use them. Make your own functions that always
check these things and call them. But you'll find that it's hard to make
them, because what you do in case of the errors varies with how you are
using the functions. You really do have to do one of two things:

        1) Ignore the error cases and hope for the best, or

        2) Consider every possible error case at every step and code the right
behavior.

        Now, you can do either in C or C++. What is the third option?

        DS

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

From: [EMAIL PROTECTED]
Subject: Re: fork() question
Date: 19 Aug 1999 08:09:16 -0600

"Rob" <[EMAIL PROTECTED] (X=y)> writes:

> Hi, When I do a fork() like this code :
> 
> pid = fork()
> 
> if (pid==0)  // Child process
> {
>   some_routine(intparam, charptr);
>   exit(0);
> }
> 
> // rest of parent process...
> 
> and the parent does a waitpid(...) to make sure the child doesn't
> become a zombie.
> Now, my question is, what exactly is copied from the parent to the
> child process? I know file handles are copied to the child, but are
> all global/local variables copied as well ? And what about pointers
> pointing to allocated memory prior to the fork process, can a child
> access this memory as well ?

fork() creates an exact copy of the parent, except that the child does
not inherit file locks and pending signals. I presume that "file handles"
means file descriptors. 

> Does the above code work then ? I mean the params passed to the
> function are those valid ?

Yes.

Kurt
-- 
Common sense is the collection of prejudices acquired by age eighteen.
                -- Albert Einstein

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

From: David Schwartz <[EMAIL PROTECTED]>
Subject: Re: Custon Device Drivers
Date: Fri, 20 Aug 1999 00:32:08 -0700


Grant Edwards wrote:
>
> It could be that most of the "value" they're selling is in the
> driver, not in the hardware.  If they publish sources to the
> driver, somebody else can come up cheap, compatible hardware,
> and then they've got no product.
> 

        Why then wouldn't they be willing to provide the source to their
customers, licensed for exclusive use with their hardware? The usual
reason is simply that the driver is so poorly written that they're too
embarrased.

        But let me ask another question: Do you plan to release the hardware
specifications of the board so that your customers could write their own
driver if they chose to? If not, why not? If so, then if your board is
at all popular, someone else will probably write a driver anyway, and
people will prefer it over yours because they'll get the source to the
other driver.

        DS

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: most efficient way to zero out a partition?
Date: 18 Aug 1999 15:03:26 -0700

"Juergen Heinzl" <[EMAIL PROTECTED]> writes:
> I'd do a low level format if that is good enough and your controller
> supports it, else I'd use dd. Given the time this posting required
> it would be ready already 8)

"Ted Pavlic" <[EMAIL PROTECTED]> writes:
> I bet by the time you sent this post, waited for a response, got one that
> suited you, and implemented it, you could have already zeroed the drive out
> with /dev/zero. ;)
> 
> 1 GB of zeroing shouldn't take TOO long... Just start it on the way away
> from your workstation for a while.

If you don't know the answer, then please don't waste everybody's time
and bandwidth.

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My PGP fingerprint: 15 6E C7 91 5F AF 17 C4  24 93 CB 6B EB 38 B5 E5

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: most efficient way to zero out a partition?
Date: Wed, 18 Aug 1999 20:43:22 GMT

In article <[EMAIL PROTECTED]>, Ronald Cole wrote:
>I feel the need to zero out my /dev/sda10.  It's a bit over 1-gig
>and so:
>
>       dd if=/dev/zero of=/dev/sda10
>
>takes a *long* time.  How would I figure out the optimal block size
>to get the job done in the shortest amount of time without resorting
>to trial-and-error?

I'd do a low level format if that is good enough and your controller
supports it, else I'd use dd. Given the time this posting required
it would be ready already 8)

Ta',
Juergen


-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: "overflow" <[EMAIL PROTECTED]>
Subject: RE: Calling a BIOS interrupt
Date: Thu, 19 Aug 1999 11:58:20 +0200

Gregory Hayrapetian <[EMAIL PROTECTED]> escribi� en el mensaje de noticias
[EMAIL PROTECTED]
>
>
> Can I call a BIOS interrupt, like int 0x10 or something, in Linux?
>
> I heard that Linux saves informations of the BIOS at boottime.
> Is this true or not?
>

I'm sure you doesn't really need to call the BIOS. Most the things the BIOS
do are done by the Linux kernel. If you tell me what you want to do, I will
try to help you.

But in case you really need to call the BIOS, you can use lrmi. Lrmi is a
DPMI like library, you can use it to make vm86 calls, and so, BIOS
interrupts. You can find it at
http://userweb.interactive.net/~joshv/lrmi-0.6.tar.gz If you want an example
of how to use it, look at vbeutils at
http://www.eurielec.etsist.upm.es/~overflow , but remember that using the
BIOS directly doesn't agree with the Linux way of thinking, use it only as
the last chance.

--
Jaime Medrano
Eurielec Linux
[EMAIL PROTECTED]
http://www.eurielec.etsit.upm.es/~overflow




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

From: Peter Mutsaers <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc,linux.redhat.rpm
Subject: Re: Why so inefficient source RPM's ??
Date: 20 Aug 1999 13:02:24 +0200

>> "CB" == Christopher Browne <[EMAIL PROTECTED]> writes:

    CB> More common appears to be...

    CB> b) The "pristine sources" changed, mandating a new version number (and
    CB> not merely because we updated the RPM).

    CB> In this case, the whole tarball is needed.

I don't think this is more common. Following redhat rawhide, and even
only the major redhat releases, there are quite a number of very
stable packages that they keep tinkering with in the specfile or
patches only. Examples are emacs, gcc (for a long time, at the moment
with egcs/gcc-2.95 it is a bit less stable) gdb, many of the GNU
utilities. Of many of these the original source isn't changed for more
than a year, but every month or so a new RPM appears, fixing some
minor things or sometimes adding an important patch.

    CB> There seems to be reasonably widespread agreement that RPM isn't the
    CB> best possible system that one might conceive of; I'm not convinced
    CB> that the situation being described represents a real good example of
    CB> "major problems with RPM."

No, with Redhat, for not distributing in a convenient manner.

-- 
Peter Mutsaers |  Abcoude (Utrecht), | Trust me, I know
[EMAIL PROTECTED]  |  the Netherlands    | what I'm doing. 

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

From: [EMAIL PROTECTED]
Subject: Re: CONFIGURE KERNEL VARIABLES
Crossposted-To: comp.os.linux.admin,comp.os.linux.help,comp.os.linux.misc
Date: 20 Aug 1999 11:57:15 GMT

In comp.os.linux.development.system Lijun Wang <[EMAIL PROTECTED]> wrote:
: Can anyone tell me how to configure the Linux
: kernel variables? When I tried to install Oracle
: for Linux, it required me to set up such kernel
: variables as: SHMMAX, SHMMIN, SHMSEG...

I actually found that Oracle ran OK without changing
these. However, to change them, you need to edit
/usr/src/linux/include/asm-i386/shmparam.h (assuming
this is on the Intel x86 platform) and recompile the
kernel. If you don't know how to recompile the kernel,
I suggest reading Kernel-HOWTO.

Rich.

-- 
[EMAIL PROTECTED] | Free email for life at: http://www.postmaster.co.uk/
BiblioTech Ltd, Unit 2 Piper Centre, 50 Carnwath Road, London, SW6 3EG.
+44 171 384 6917 | Click here to play XRacer: http://xracer.annexia.org/
--- Original message content Copyright � 1999 Richard Jones ---

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

From: "Sascha Bohnenkamp" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Linux file-size limit?
Date: Fri, 20 Aug 1999 13:33:43 +0200

>ext2, in particular, can support file sizes up to 1T, since files are
>segmented.
upto 16TB ... with huge inodes

>b) You can't read all of it using standard C file manipulation
>functions on 32 bit architectures because the "FILE *" structure only
>allows addressing the first 2^31 bytes of the file.
well with solaris or unixware your ARE able to do that on 32b mashines



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

From: [EMAIL PROTECTED] (Christopher B. Browne)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Lisp OSes (was: Re: Troll (was: why not C++?))
Reply-To: [EMAIL PROTECTED]
Date: Fri, 20 Aug 1999 12:40:20 GMT

On 20 Aug 1999 08:59:59 +0200, Stephan Houben
<[EMAIL PROTECTED]> posted: 
>OK, you have me convinced. I want it.
>
>Is anyone working on a new Lisp OS nowadays?

See: <http://www.hex.net/~cbbrowne/lisposes.html> for links to several
projects.

It's not clear which, if any, will get sufficiently developed as to be
of real interest...

-- 
"Note that if I can get you  to `su and say' something just by asking,
you have a very serious security problem on your system and you should
look into it."  -- Paul Vixie, vixie-cron 3.0.1 installation notes
[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/lsf.html>

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

From: Christoph Martin <[EMAIL PROTECTED]>
Subject: Re: DRIVER for Toshiba DVD-RAM (only tested on kernel 2.0.36)
Date: 20 Aug 1999 14:37:36 +0200

Christian Mund <[EMAIL PROTECTED]> writes:

> 
> 
> Christoph Martin wrote:
> > 
> > Christian Mund <[EMAIL PROTECTED]> writes:
> > 
> > > 
> > > Congratulations, it works !
> > > 
> > 
> > It did not work, applying it to kernel 2.2.6. Same problems with read
> > and write. Works for some time, then hangs, scsi bus reset, all
> > devices hang -> reboot
> > 
> > Christoph
> > 
> Hi Christoph,
> 
> i only patched the sd.c - File and it works great for me. I can do mke2fs
> and read/write to the DVD-RAM Medias. No Bus resets, Hangs.
> What does dmesg say, when you get into trouble ?
> 

Copy from DVD to DVD without access of other SCSI-Devices has no
problems, but ..

call of ls for SCSI-harddisk during copy from DVD to DVD:

scsi : aborting command due to timeout : pid 40435, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 a9 e0 00 00 40 00
SCSI host 0 abort (pid 40435) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 40460, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 44 5b 74 00 00 12 00
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00
scsi : aborting command due to timeout : pid 40443, scsi0, channel 0,
id 4, lun 1 Write (10) 20 00 01 3b 35 00 00 20 00
scsi : aborting command due to timeout : pid 40441, scsi0, channel 0,
id 4, lun 1 Write (10) 20 00 00 00 29 00 00 01 00
scsi : aborting command due to timeout : pid 40448, scsi0, channel 0,
id 4, lun 1 Write (10) 20 00 01 3b 75 00 00 20 00
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00
SCSI host 0 abort (pid 40443) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
SCSI host 0 channel 0 reset (pid 40443) timed out - trying harder
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 40459, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 7e e0 00 00 02 00
scsi : aborting command due to timeout : pid 40458, scsi0, channel 0,
id 0, lun 0 Write (10) 00 00 3e 60 72 00 00 02 00

call of 'shutdown -r now' while copy from DVD to DVD:

scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 52695, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 c7 d6 00 00 02 00
scsi : aborting command due to timeout : pid 52693, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 c3 82 00 00 02 00
SCSI host 0 abort (pid 52693) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
SCSI host 0 abort (pid 52693) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
SCSI host 0 abort (pid 52695) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
SCSI host 0 channel 0 reset (pid 52693) timed out - trying harder
SCSI bus is being reset for host 0 channel 0.
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 52702, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 b0 9c 00 00 02 00
scsi : aborting command due to timeout : pid 52701, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 80 0a 00 00 02 00
SCSI host 0 abort (pid 52701) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.

Copy from DVD-Ram to Raid0 on id 0 and 12.

scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66366, scsi0, channel 0,
id 4, lun
1 Prevent/Allow Medium Removal 20 00 00 01 00
scsi : aborting command due to timeout : pid 66361, scsi0, channel 0,
id 0, lun
0 Read (10) 00 00 3b e0 96 00 00 02 00
scsi : aborting command due to timeout : pid 66362, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 c0 0a 00 00 02 00
scsi : aborting command due to timeout : pid 66363, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 c3 82 00 00 02 00
scsi : aborting command due to timeout : pid 66364, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 c7 d6 00 00 02 00
SCSI host 0 abort (pid 66364) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
SCSI host 0 abort (pid 66364) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66371, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 39 20 a8 00 00 02 00
SCSI host 0 channel 0 reset (pid 66364) timed out - trying harder
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66371, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 39 20 a8 00 00 02 00
SCSI host 0 channel 0 reset (pid 66364) timed out - trying harder
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66376, scsi0, channel 0,
id 4, lun 1 Prevent/Allow Medium Removal 20 00 00 01 00
SCSI host 0 abort (pid 66364) timed out - resetting
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66371, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 39 20 a8 00 00 02 00
SCSI host 0 channel 0 reset (pid 66364) timed out - trying harder
SCSI bus is being reset for host 0 channel 0.
scsi : aborting command due to timeout : pid 66379, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 3f 80 24 00 00 02 00
scsi : aborting command due to timeout : pid 66381, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 44 09 d4 00 00 02 00
scsi : aborting command due to timeout : pid 66382, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 80 0a 00 00 02 00
scsi : aborting command due to timeout : pid 66383, scsi0, channel 0,
id 12, lun 0 Read (10) 00 00 03 b0 9c 00 00 02 00
scsi : aborting command due to timeout : pid 66385, scsi0, channel 0,
id 0, lun 0 Read (10) 00 00 44 3c c0 00 00 02 00
SCSI host 0 abort (pid 66383) timed out - resetting
SCSI bus is being reset for host 0 channel 0.

-- 
============================================================================
Christoph Martin, Uni-Mainz, Germany
 Internet-Mail:  [EMAIL PROTECTED]

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

From: Bill Gribble <[EMAIL PROTECTED]>
Subject: Re: LispOS?
Date: 20 Aug 1999 08:35:23 -0500

[EMAIL PROTECTED] (Christopher Browne) writes:
> c) Scheme environment that builds a definitely not-UNIX-like environment
> from the ground up.  Persistent objects, user interface based on
> DHTML, with a "simulated Linux API."

I'd love to see what a system like this looked like on a large scale.
Apple came *really* close with their Newton OS... everything was a
persistent object store, with a nifty prototype-based inheritance
system.  Applications were just objects, and they could publish APIs
by giving themselves slots/functions that you could call.  The
application language was a lispy little thing called "Newtonscript"
with a syntax only a mother could love but its heart was in the right
place.

Too bad they dropped it. 

Bill Gribble


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

From: [EMAIL PROTECTED] (Paul D. Smith)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: 20 Aug 1999 09:42:23 -0400
Reply-To: [EMAIL PROTECTED]

%% David Schwartz <[EMAIL PROTECTED]> writes:

  ds> I remember way back in my microcontroller days, dealing with a chip
  ds> that had no hardware capability to do signed arithmetic. So when people
  ds> had:

  ds> int i;
  ds> for(i=0; i<10; i++) { something(i); }

  ds> I changed it to:

  ds> unsigned int i;
  ds> for(i=0; i<10; i++) { something(i); }

  ds> And things got much faster. Then I remembered that the chip had a
  ds> 'decrement and jump if not zero' instruction. So we next went to:

  ds> unsigned int i;
  ds> for(i=10; i!=0; i--) { something(i); }

  ds> And things got much faster again.

Of course, these two loops aren't equivalent.

  ds> You always have to look at what your code is making the machine
  ds> actually _do_.

MHO: optimizations for specific hardware should be the responsibility of
the compiler and, given that you're interested in writing general,
portable code and not device drivers, etc. the programmer should not
bother to concern him/herself with them.

I never look at what my code is making the machine actually do when
writing C, since I write code that runs on many platforms and that kind
of optimization in C is useless (or worse) in the large.

If I care that much about what the machine is actually doing, well,
that's what the asm statement is for, right?

-- 
===============================================================================
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
===============================================================================
   These are my opinions---Nortel Networks takes no responsibility for them.

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


** 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
******************************

Reply via email to