I think the real problem is in gdm here: if it wants to read the user's
shell startup files, it should do so using the user's login shell, not
/bin/sh. User shell startup files cannot be guaranteed to even parse in
/bin/sh, and changing /bin/sh to make it work degrades sh -n for actual
/bin/sh scripts.

As a workaround, use . or eval to pull in the extension-using code if
the extensions are supported.

POSIX does not say whether it is allowed to define a function with the
same name as a special builtin such as exit, but does say that it is
impossible to call such a function. This is a feature as it makes sure
that if something looks like a special builtin (after alias expansion),
it is one. For example, unset cannot be overridden with a function,
which allows using it to remove functions covering all other utilities.

-- 
can't define custom exit function
https://bugs.launchpad.net/bugs/301225
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to