Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3650 - bug in /sbin/rc
Summary: bug in /sbin/rc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://www.gentoo.org/cgi-bin/viewcvs...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-11 19:34 UTC by Felix von Leitner
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix von Leitner 2002-06-11 19:34:18 UTC
/sbin/rc contains the function try.  This function does:

local errstr="$((eval $*) 2>&1 >/dev/null)"

retval=$?



in this code, retval will _always_ be 0, because local is a command that never fails.  So the error handling code below it is never executed.  Solution: first do local errstr and then do the assignment in the next line.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2002-06-12 06:13:56 UTC
Updated in cvs. Thanks.