nc, hush: cosmetic cleanups, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
4b7db4f2ca
commit
28a105d867
@ -129,7 +129,7 @@ int nc_main(int argc, char **argv)
|
||||
|
||||
if (wsecs) {
|
||||
alarm(0);
|
||||
/* Non-ignored siganls revert to SIG_DFL on exec anyway */
|
||||
/* Non-ignored signals revert to SIG_DFL on exec anyway */
|
||||
/*signal(SIGALRM, SIG_DFL);*/
|
||||
}
|
||||
|
||||
|
14
shell/hush.c
14
shell/hush.c
@ -612,7 +612,7 @@ static const struct built_in_command bltins[] = {
|
||||
BLTIN("test" , builtin_test , "Test condition"),
|
||||
BLTIN("trap" , builtin_trap , "Trap signals"),
|
||||
BLTIN("type" , builtin_type , "Write a description of command type"),
|
||||
// BLTIN("ulimit" , builtin_return , "Control resource limits"),
|
||||
// BLTIN("ulimit" , builtin_ulimit , "Control resource limits"),
|
||||
BLTIN("umask" , builtin_umask , "Set file creation mask"),
|
||||
BLTIN("unset" , builtin_unset , "Unset environment variable"),
|
||||
BLTIN("wait" , builtin_wait , "Wait for process"),
|
||||
@ -819,7 +819,7 @@ static void syntax_error_unexpected_ch(unsigned lineno, int ch)
|
||||
#if ENABLE_HUSH_INTERACTIVE
|
||||
static void cmdedit_update_prompt(void);
|
||||
#else
|
||||
# define cmdedit_update_prompt()
|
||||
# define cmdedit_update_prompt() ((void)0)
|
||||
#endif
|
||||
|
||||
|
||||
@ -1003,13 +1003,13 @@ static void restore_G_args(save_arg_t *sv, char **argv)
|
||||
* If job control is off, backgrounded commands ("cmd &")
|
||||
* have SIGINT, SIGQUIT set to SIG_IGN.
|
||||
*
|
||||
* Commands run in command substitution ("`cmd`")
|
||||
* Commands which are run in command substitution ("`cmd`")
|
||||
* have SIGTTIN, SIGTTOU, SIGTSTP set to SIG_IGN.
|
||||
*
|
||||
* Ordinary commands have signals set to SIG_IGN/DFL as inherited
|
||||
* by the shell from its parent.
|
||||
*
|
||||
* Siganls which differ from SIG_DFL action
|
||||
* Signals which differ from SIG_DFL action
|
||||
* (note: child (i.e., [v]forked) shell is not an interactive shell):
|
||||
*
|
||||
* SIGQUIT: ignore
|
||||
@ -6294,7 +6294,7 @@ int hush_main(int argc, char **argv)
|
||||
/* bash: after sourcing /etc/profile,
|
||||
* tries to source (in the given order):
|
||||
* ~/.bash_profile, ~/.bash_login, ~/.profile,
|
||||
* stopping of first found. --noprofile turns this off.
|
||||
* stopping on first found. --noprofile turns this off.
|
||||
* bash also sources ~/.bash_logout on exit.
|
||||
* If called as sh, skips .bash_XXX files.
|
||||
*/
|
||||
@ -6325,8 +6325,8 @@ int hush_main(int argc, char **argv)
|
||||
* NB: don't forget to (re)run block_signals(0/1) as needed.
|
||||
*/
|
||||
|
||||
/* A shell is interactive if the '-i' flag was given, or if all of
|
||||
* the following conditions are met:
|
||||
/* A shell is interactive if the '-i' flag was given,
|
||||
* or if all of the following conditions are met:
|
||||
* no -c command
|
||||
* no arguments remaining or the -s flag given
|
||||
* standard input is a terminal
|
||||
|
Loading…
Reference in New Issue
Block a user