Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 1998 22:53:21 +0930
From:      Matthew Thyer <thyerm@camtech.net.au>
To:        joelh@gnu.org
Cc:        wosch@panke.de.freebsd.org, current@FreeBSD.ORG
Subject:   Re: file segment sizes of a core dump
Message-ID:  <35E40C49.C673670C@camtech.net.au>
References:  <199808231906.VAA04727@campa.panke.de> <35E18FF5.B7FADA7B@camtech.net.au> <19980824193728.B4111@panke.de> <199808251931.OAA00986@detlev.UUCP>

next in thread | previous in thread | raw e-mail | index | archive | help
Good point.

Maybe a hybrid check which includes the /usr/share/misc/magic test
and a check for the existance of the segments could be used.

I dont know what segments are mandatory in a core file and it could
be a truncated file so maybe this is not a good idea.

Assuming the user knows what they are doing along with the magic
test should be enough.

Joel Ray Holveck wrote:
> 
> >> Why require an option ?
> >> Why not make size do what you want automatically when it detects
> >> that you are running it on a core file ?
> > How do you know that the file is a FreeBSD core file and not garbage?
> > file(1) has a gross hack to identify core files, see /usr/share/misc/magic.
> 
> Why would you run size on garbage?
> 
> Best,
> joelh
> 
> --
> Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan
>    Fourth law of programming:
>    Anything that can go wrong wi
> sendmail: segmentation violation - core dumped
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message

-- 
/=====================================================================\
|Work: Matthew.Thyer@dsto.defence.gov.au | Home: thyerm@camtech.net.au|
\=====================================================================/
"If it is true that our Universe has a zero net value for all conserved
quantities, then it may simply be a fluctuation of the vacuum of some
larger space in which our Universe is imbedded. In answer to the
question of why it happened, I offer the modest proposal that our
Universe is simply one of those things which happen from time to time."
 E. P. Tryon   from "Nature" Vol.246 Dec.14, 1973

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35E40C49.C673670C>