[Bug 9081] New: ash return in function exits shell instead of function

bugzilla at busybox.net bugzilla at busybox.net
Tue Jul 5 21:52:44 UTC 2016


https://bugs.busybox.net/show_bug.cgi?id=9081

            Bug ID: 9081
           Summary: ash return in function exits shell instead of function
           Product: Busybox
           Version: 1.21.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: anthonybest at bestanthony.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 6541
  --> https://bugs.busybox.net/attachment.cgi?id=6541&action=edit
return exits shell

When return is the first command in the else block inside of a function the
shell exits.

It does not exit if return is the second command.

This only seems to happen if the -e flag is set. See attachment for test case.

If you make this change, it starts working again:

       if false ; then
           echo "false"
       else
           echo "anything"
           return
       fi

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list