DragonFly commits List (threaded) for 2009-06
DragonFly BSD
DragonFly commits List (threaded) for 2009-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.1.286.gedc2d master bin/sh eval.c


From: Stathis Kamperis <beket@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jun 2009 07:03:11 -0700 (PDT)

commit edc2dda3dc3fccec8603cc28bc8650188872e8d4
Author: Stathis Kamperis <beket@dragonflybsd.org>
Date:   Wed Jun 17 16:21:16 2009 +0300

    sh(1): Reset getopt(3) before executing built-in commands.
    
    Before patch:
    $ printf "test\n"
    test
    $ jobs -l
    $ printf "test\n"
    usage: printf format [arg ...]
    $
    
    After patch:
    $ printf "test\n"
    test
    $ jobs -l
    $ printf "test\n"
    test
    $
    
    The bug isn't tight to jobs(1) or printf(1). Every use of getopt(3) would
    advance `optind' and make the next built-in command think that it wasn't
    supplied with enough arguments. NetBSD is doing as we do. FreeBSD doesn't
    have printf(1) as built-in so it is not affected. The patch has survived
    a build{world, kernel}.

Summary of changes:
 bin/sh/eval.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/edc2dda3dc3fccec8603cc28bc8650188872e8d4


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]