Static bins

Matthew Burgess matthew at linuxfromscratch.org
Wed Jan 7 14:51:34 PST 2004


On Wed, 7 Jan 2004 22:46:21 +0000 (GMT)
Christopher James Coleman <ug97cjc at cs.bham.ac.uk> wrote:

> 
> On Wed, 7 Jan 2004, Matthew Burgess wrote:
> 
> > On Wed, 07 Jan 2004 16:59:08 -0500
> > Robert Connolly <cendres at videotron.ca> wrote:
> >
> > > Also:
> > >
> > > cat > false.S << "EOF"
> > > .global _start
> > > _start:
> > > movl    $0,%ebx
> >           ^^
> >           $1 ;surely for false? :)
> 
> No, any non-zero value is true. A successful return from a program
> should signal that nothing needs to be done.

Which is precisely what 0 does (indicates a successful return) and is
therefore what `true` should return

Consider:

$/bin/true
$echo $?
0
$/bin/false
$echo $?
1

Also man pages will confirm that exit status on successful completion
!=0.

Regards,

Matt.



More information about the hlfs-dev mailing list