| Age | Commit message (Collapse) | Author |
|
Some programs like su(1) do not restore tty attributes like ECHO when they are
terminated by receiving SIGINT. Other shells (bash, mksh, zsh) save tty
attributes before executing an external command and restore them if the child
exited due to the receipt of a signal. rc now does the same if it is
interactive.
|
|
This fixes rakitzis/rc issue #40.
Both cases suffered from a misconception of statprint() in which the necessary
check for -e happens. The checked status value gets passed to statprint() as an
argument but the corresponding value passed to rc_exit() in case the status is
non-zero comes from getstatus(), which requires that the checked status is
written to statuses[] first. For pipelines this happened in the wrong order and
for backquotes the status value was not put into statuses[] at all.
Making statprint() a static helper function prevents this mistake by only
leaving the setstatus family of functions to handle status codes.
|
|
needs quoting past the "quoting detector", so `fn x { echo $(x.y) }'
now works both in the current rc and its descendants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|