Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 180548

Summary: using an unknown option with `set -o` causes dash to abort early
Product: Gentoo Linux Reporter: SpanKY <vapier>
Component: [OLD] Core systemAssignee: Roy Marples (RETIRED) <uberlord>
Status: RESOLVED INVALID    
Severity: normal CC: truedfx
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description SpanKY gentoo-dev 2007-06-01 13:32:07 UTC
if dash is given an option to `set -o` that it doesnt understand, it aborts the script instead of simply having `set` exit with a non-zero value

this causes `ldd` to fail with dash

this script should show "moocow" but only gets out "moo" with dash:
#!/bin/dash
echo -n moo
set -o pipefail 2> /dev/null
echo cow
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2007-06-01 16:43:20 UTC
This is not a bug in dash; susv3 explicitly allows this behaviour. See 2.14 "Special Built-In Utilities", item 1: "A syntax error in a special built-in utility may cause a shell executing that utility to abort, while a     syntax error in a regular built-in utility shall not cause a shell executing that utility to abort." set is a "special built-in utility".
Comment 2 SpanKY gentoo-dev 2007-06-01 19:00:05 UTC
fair enough ... still lame ;)