diff options
| author | Ned Ludd <solar@gentoo.org> | 2005-02-10 00:44:31 +0000 |
|---|---|---|
| committer | Ned Ludd <solar@gentoo.org> | 2005-02-10 00:44:31 +0000 |
| commit | d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7 (patch) | |
| tree | aa8818eefb95ec6deaeb35291c61879c932194a1 /shell | |
| parent | 2123b7cded4d28173b8a9e5bd40c565cbb1a75b1 (diff) | |
| download | busybox-w32-d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7.tar.gz busybox-w32-d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7.tar.bz2 busybox-w32-d1e3cbdb5a9dd026b95cb4760405f10a060ee7e7.zip | |
- no need to check if JOBS is defined. Config.in ensures it.
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5bcda749f..0e9d58ae6 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -12583,7 +12583,7 @@ readcmd(int argc, char **argv) | |||
| 12583 | char *prompt; | 12583 | char *prompt; |
| 12584 | const char *ifs; | 12584 | const char *ifs; |
| 12585 | char *p; | 12585 | char *p; |
| 12586 | #if defined(CONFIG_ASH_TIMEOUT) && JOBS | 12586 | #if defined(CONFIG_ASH_TIMEOUT) |
| 12587 | fd_set set; | 12587 | fd_set set; |
| 12588 | int timeout; | 12588 | int timeout; |
| 12589 | struct timeval timeout_struct; | 12589 | struct timeval timeout_struct; |
| @@ -12595,7 +12595,7 @@ readcmd(int argc, char **argv) | |||
| 12595 | 12595 | ||
| 12596 | rflag = 0; | 12596 | rflag = 0; |
| 12597 | prompt = NULL; | 12597 | prompt = NULL; |
| 12598 | #if defined(CONFIG_ASH_TIMEOUT) && JOBS | 12598 | #if defined(CONFIG_ASH_TIMEOUT) |
| 12599 | timeout = 0; | 12599 | timeout = 0; |
| 12600 | 12600 | ||
| 12601 | while ((i = nextopt("p:rt:")) != '\0') | 12601 | while ((i = nextopt("p:rt:")) != '\0') |
| @@ -12607,7 +12607,7 @@ readcmd(int argc, char **argv) | |||
| 12607 | prompt = optionarg; | 12607 | prompt = optionarg; |
| 12608 | else if (i == 'r') | 12608 | else if (i == 'r') |
| 12609 | rflag = 1; | 12609 | rflag = 1; |
| 12610 | #if defined(CONFIG_ASH_TIMEOUT) && JOBS | 12610 | #if defined(CONFIG_ASH_TIMEOUT) |
| 12611 | else | 12611 | else |
| 12612 | timeout = atoi(optionarg); | 12612 | timeout = atoi(optionarg); |
| 12613 | #endif | 12613 | #endif |
| @@ -12619,7 +12619,7 @@ readcmd(int argc, char **argv) | |||
| 12619 | error("arg count"); | 12619 | error("arg count"); |
| 12620 | if ((ifs = bltinlookup("IFS")) == NULL) | 12620 | if ((ifs = bltinlookup("IFS")) == NULL) |
| 12621 | ifs = defifs; | 12621 | ifs = defifs; |
| 12622 | #if defined(CONFIG_ASH_TIMEOUT) && JOBS | 12622 | #if defined(CONFIG_ASH_TIMEOUT) |
| 12623 | c = 0; | 12623 | c = 0; |
| 12624 | #endif | 12624 | #endif |
| 12625 | status = 0; | 12625 | status = 0; |
| @@ -12627,7 +12627,7 @@ readcmd(int argc, char **argv) | |||
| 12627 | backslash = 0; | 12627 | backslash = 0; |
| 12628 | 12628 | ||
| 12629 | STARTSTACKSTR(p); | 12629 | STARTSTACKSTR(p); |
| 12630 | #if defined(CONFIG_ASH_TIMEOUT) && JOBS | 12630 | #if defined(CONFIG_ASH_TIMEOUT) |
| 12631 | if (timeout > 0) { | 12631 | if (timeout > 0) { |
| 12632 | tcgetattr(0, &tty); | 12632 | tcgetattr(0, &tty); |
| 12633 | old_tty = tty; | 12633 | old_tty = tty; |
| @@ -12642,8 +12642,7 @@ readcmd(int argc, char **argv) | |||
| 12642 | timeout_struct.tv_sec = timeout; | 12642 | timeout_struct.tv_sec = timeout; |
| 12643 | timeout_struct.tv_usec = 0; | 12643 | timeout_struct.tv_usec = 0; |
| 12644 | 12644 | ||
| 12645 | i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct); | 12645 | if ((i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct)) == 1) |
| 12646 | if(i == 1) | ||
| 12647 | { | 12646 | { |
| 12648 | read(0, &c, 1); | 12647 | read(0, &c, 1); |
| 12649 | if(c == '\n' || c == 4) /* Handle newlines and EOF */ | 12648 | if(c == '\n' || c == 4) /* Handle newlines and EOF */ |
