]> git.pld-linux.org Git - packages/bash.git/blame - bash40-016
- up to 4.0.33
[packages/bash.git] / bash40-016
CommitLineData
bd03fb8f
AM
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 4.0
5Patch-ID: bash40-016
6
7Bug-Reported-by: Brian J. Murrell" <brian@interlinx.bc.ca>
8Bug-Reference-ID: <1237564627.7666.12.camel@pc.interlinx.bc.ca>
9Bug-Reference-URL:http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00160.html
10
11Bug-Description:
12
13There are several problems with the handling of $LINENO in an ERR trap.
14
15Patch:
16
17*** ../bash-4.0-patched/trap.c 2009-01-16 17:07:53.000000000 -0500
18--- trap.c 2009-03-20 21:37:00.000000000 -0400
19***************
20*** 756,760 ****
21
22 flags = SEVAL_NONINT|SEVAL_NOHIST;
23! if (sig != DEBUG_TRAP && sig != RETURN_TRAP)
24 flags |= SEVAL_RESETLINE;
25 if (function_code == 0)
26--- 756,760 ----
27
28 flags = SEVAL_NONINT|SEVAL_NOHIST;
29! if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
30 flags |= SEVAL_RESETLINE;
31 if (function_code == 0)
32*** ../bash-4.0-patched/execute_cmd.c 2009-02-13 16:41:41.000000000 -0500
33--- execute_cmd.c 2009-03-21 14:16:11.000000000 -0400
34***************
35*** 569,572 ****
36--- 569,573 ----
37 /* Fork a subshell, turn off the subshell bit, turn off job
38 control and call execute_command () on the command again. */
39+ line_number_for_err_trap = line_number;
40 paren_pid = make_child (savestring (make_command_string (command)),
41 asynchronous);
42***************
43*** 611,615 ****
44--- 612,619 ----
45 {
46 last_command_exit_value = exec_result;
47+ save_line_number = line_number;
48+ line_number = line_number_for_err_trap;
49 run_error_trap ();
50+ line_number = save_line_number;
51 }
52
53***************
54*** 767,771 ****
55--- 771,777 ----
56 {
57 last_command_exit_value = exec_result;
58+ line_number = line_number_for_err_trap;
59 run_error_trap ();
60+ line_number = save_line_number;
61 }
62
63***************
64*** 2106,2109 ****
65--- 2112,2116 ----
66 COMMAND *tc, *second;
67 int ignore_return, exec_result, was_error_trap, invert;
68+ volatile int save_line_number;
69
70 ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
71***************
72*** 2175,2178 ****
73--- 2182,2186 ----
74 ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
75
76+ line_number_for_err_trap = line_number;
77 exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close);
78
79***************
80*** 2180,2184 ****
81--- 2188,2195 ----
82 {
83 last_command_exit_value = exec_result;
84+ save_line_number = line_number;
85+ line_number = line_number_for_err_trap;
86 run_error_trap ();
87+ line_number = save_line_number;
88 }
89
90*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
91--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
92***************
93*** 26,30 ****
94 looks for to find the patch level (for the sccs version string). */
95
96! #define PATCHLEVEL 15
97
98 #endif /* _PATCHLEVEL_H_ */
99--- 26,30 ----
100 looks for to find the patch level (for the sccs version string). */
101
102! #define PATCHLEVEL 16
103
104 #endif /* _PATCHLEVEL_H_ */
This page took 0.045349 seconds and 4 git commands to generate.