diff options
author | solar <solar@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-02-10 00:44:31 +0000 |
---|---|---|
committer | solar <solar@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-02-10 00:44:31 +0000 |
commit | 6ba3855c516a2f9622635dc430eec76aa29eece6 (patch) | |
tree | aa8818eefb95ec6deaeb35291c61879c932194a1 | |
parent | 62077bd183e7b64af25f3efdc5a1d3be885d62f1 (diff) | |
download | busybox-w32-6ba3855c516a2f9622635dc430eec76aa29eece6.tar.gz busybox-w32-6ba3855c516a2f9622635dc430eec76aa29eece6.tar.bz2 busybox-w32-6ba3855c516a2f9622635dc430eec76aa29eece6.zip |
- no need to check if JOBS is defined. Config.in ensures it.
git-svn-id: svn://busybox.net/trunk/busybox@9838 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 */ |