Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Niels Baggesen
Wed, 28 Feb 1990 13:01
minor problems with bash-1.04 under SYS V
Author: Niels Baggesen
Date: Wed, 28 Feb 1990 13:01
Date: Wed, 28 Feb 1990 13:01
165 lines
4654 bytes
4654 bytes
I have recently installed bash-1.04 on my Sys V.3.1 box, and like it very
much. I have changed my login shell from csh to bash. I have found a few
problems that I have fixed as follows:
1) globbing fails when the patterns starts with a slash (such as "echo /u*")
2) hitting BREAK while bash is in command mode loses the echo flag and makes
bash very unresponsive until you type "stty echo"
3) if you define a function that start a background job, such as
bpr() {
pr $* | lp &
}
when you then call bpr, it will echo the pid of the background process,
but then hangs waiting for it to complete.
Also, the "wait" command is a no-op.
Thank you for creating this nice thing. If there exist updates to bash I
would like to know about them.
Niels Baggesen.
PS: my installation options are SYSV USGr3
Context diff of my changes follows:
*** glob.c.org Sat Sep 23 05:35:45 1989
--- glob.c Tue Feb 20 08:33:43 1990
***************
*** 416,421 ****
--- 416,422 ----
else
{
directory_len = filename - pathname;
+ if (directory_len == 0) directory_len = 1;
directory_name = (char *) alloca (directory_len + 1);
bcopy (pathname, directory_name, directory_len);
directory_name[directory_len] = '\0';
***************
*** 429,436 ****
--- 430,439 ----
char **directories;
register unsigned int i;
+ /*
if (directory_name[directory_len - 1] == '/')
directory_name[directory_len - 1] = '\0';
+ */
directories = glob_filename (directory_name);
***************
*** 534,546 ****
int argc;
char **argv;
{
! unsigned int i;
! for (i = 1; i < argc; ++i)
{
! char **value = glob_filename (argv[i]);
if (value == NULL)
! puts ("Out of memory.")
else if ((int) value == -1)
perror (argv[i]);
else
--- 537,549 ----
int argc;
char **argv;
{
! unsigned int i, j;
! for (j = 1; j < argc; ++j)
{
! char **value = glob_filename (argv[j]);
if (value == NULL)
! puts ("Out of memory.");
else if ((int) value == -1)
perror (argv[i]);
else
*** nojobs.c.org Wed Nov 1 22:26:13 1989
--- nojobs.c Wed Feb 28 10:11:33 1990
***************
*** 172,178 ****
programming_error ("got errno %d while waiting for %d", errno, pid);
}
-
#ifdef SYSV
sigrelse (oldmask);
#else
--- 172,177 ----
***************
*** 246,252 ****
}
wait_for_background_pids ()
! {}
! wait_for_single_pid ()
! {}
--- 245,257 ----
}
wait_for_background_pids ()
! {
! while (wait_for (0))
! ;
! }
! wait_for_single_pid (pid)
! int pid;
! {
! wait_for (pid);
! }
*** readline/readline.c.org Sat Nov 4 14:42:01 1989
--- readline/readline.c Tue Feb 27 14:09:12 1990
***************
*** 2104,2109 ****
--- 2104,2110 ----
#ifndef HANDLE_SIGNALS
tio.c_lflag &= ~ISIG;
+ tio.c_iflag &= ~BRKINT;
#endif
tio.c_cc[VEOF] = 1; /* really: MIN */
*** execute_cmd.c.org Fri Nov 3 22:11:24 1989
--- execute_cmd.c Wed Feb 28 10:03:15 1990
***************
*** 109,115 ****
if (!command || breaking || continuing)
return (EXECUTION_SUCCESS);
-
/* If a command was being explicitly run in a subshell, or if it is
a shell control-structure, and it has a pipe, then we do the command
in a subshell. */
--- 109,114 ----
***************
*** 222,228 ****
if (asynchronous)
describe_pid (last_made_pid);
! else
exec_result = wait_for (last_made_pid);
}
}
--- 221,227 ----
if (asynchronous)
describe_pid (last_made_pid);
! else if (last_made_pid != last_asynchronous_pid)
exec_result = wait_for (last_made_pid);
}
}
--
+-------------------------------------------------------------------------+
| Niels Baggesen, Sysware, Tordenskjoldsgade 23 A, 8200 Aarhus N, Denmark |
| Phone: +45 86 10 20 55 Fax: +45 86 10 26 41 E-mail: nba@sysware.dk |
+------------- If you think I expressed an opinion, I am wrong ---------+
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads