diff options
Diffstat (limited to 'shell/lash.c')
-rw-r--r-- | shell/lash.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/shell/lash.c b/shell/lash.c index 92c24d1..be2f364 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -22,7 +22,18 @@ #include "busybox.h" +#include <stdio.h> +#include <stdlib.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <signal.h> +#include <string.h> +#include <sys/ioctl.h> +#include <sys/wait.h> +#include <unistd.h> #include <getopt.h> +#include <termios.h> #include "cmdedit.h" #ifdef CONFIG_LOCALE_SUPPORT @@ -532,6 +543,16 @@ static void checkjobs(struct jobset *j_list) /* child stopped */ job->stopped_progs++; job->progs[prognum].is_stopped = 1; + +#if 0 + /* Printing this stuff is a pain, since it tends to + * overwrite the prompt an inconveinient moments. So + * don't do that. */ + if (job->stopped_progs == job->num_progs) { + printf(JOB_STATUS_FORMAT, job->jobid, "Stopped", + job->text); + } +#endif } } @@ -686,6 +707,26 @@ static int get_command(FILE * source, char *command) return 0; } +static char* itoa(register int i) +{ + static char a[7]; /* Max 7 ints */ + register char *b = a + sizeof(a) - 1; + int sign = (i < 0); + + if (sign) + i = -i; + *b = 0; + do + { + *--b = '0' + (i % 10); + i /= 10; + } + while (i); + if (sign) + *--b = '-'; + return b; +} + static char * strsep_space( char *string, int * ix) { char *token; |