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

看板DFBSD_commit作者時間16年前 (2009/06/18 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #1AEIzf00 (DFBSD_commit)