Imagine two bash programs: program1 and program2. Program1 invokes program2, like the following
program1:
-------------------------------
echo "calling program2"
./program2
echo "back from program2"
program2:
-------------------------------------
echo "hello from program2"
echo "hello again from program2"
Now if you run program1 under bashdb: bashdb program1, and try to step *over* the lines using the "next" command, you will actually step *into* program2.
This problem disappears if you add #!/bin/bash to program2. Is this a bug?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If there is a bug, then it's a bash bug, in which case you would use bashbug to report it. However I'm not certain that is the case.
What I do believe however is that (for reasons that are a mystery to me), when I run this bashdb-main.inc is getting called again, from what appears to be bash reinitializing itself for running program2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Imagine two bash programs: program1 and program2. Program1 invokes program2, like the following
program1:
-------------------------------
echo "calling program2"
./program2
echo "back from program2"
program2:
-------------------------------------
echo "hello from program2"
echo "hello again from program2"
Now if you run program1 under bashdb: bashdb program1, and try to step *over* the lines using the "next" command, you will actually step *into* program2.
This problem disappears if you add #!/bin/bash to program2. Is this a bug?
BTW I am running Bourne-Again Shell Debugger, release bash-3.1-0.09 on centos-5.2
If there is a bug, then it's a bash bug, in which case you would use bashbug to report it. However I'm not certain that is the case.
What I do believe however is that (for reasons that are a mystery to me), when I run this bashdb-main.inc is getting called again, from what appears to be bash reinitializing itself for running program2.