[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #32449] function return value clamped to 0 or 1
From: |
Josh Triplett |
Subject: |
[bug #32449] function return value clamped to 0 or 1 |
Date: |
Sun, 13 Feb 2011 07:14:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20110208 Firefox/4.0b11 Iceweasel/4.0b11 |
URL:
<http://savannah.gnu.org/bugs/?32449>
Summary: function return value clamped to 0 or 1
Project: GNU GRUB
Submitted by: joshtriplett
Submitted on: Sat 12 Feb 2011 11:14:40 PM PST
Category: None
Severity: Major
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Bazaar - trunk
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Originally reported as http://bugs.debian.org/612992
The grub manual says that the return statement will use its argument as
the exit code of the function. However, all non-zero exit codes seem to
get clamped to 1:
grub> function f { return 0 ; } ; f ; echo $?
0
grub> function f { return 1 ; } ; f ; echo $?
1
grub> function f { return 2 ; } ; f ; echo $?
1
grub> function f { return 42 ; } ; f ; echo $?
1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32449>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #32449] function return value clamped to 0 or 1,
Josh Triplett <=