Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180548 - using an unknown option with `set -o` causes dash to abort early
Summary: using an unknown option with `set -o` causes dash to abort early
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-01 13:32 UTC by SpanKY
Modified: 2007-06-01 19:00 UTC (History)
1 user (show)

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 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 ;)