Question: is this a bug in BASh (pre-exec trap)

2016-09-09 Thread Matthew Giassa
Good day, I've been doing some testing with the bash-prexec script which uses a DEBUG trap to issue user-supplied functions before executing each command (https://github.com/rcaloras/bash-preexec). Here is a minimal working example (https://github.com/rcaloras/bash-preexec/issues/25) which cause

Forcing builtins (interactive, non-interactive shells) to execute in fork()'ed process.

2016-10-26 Thread Matthew Giassa
. On a side note, its interesting how bash 4.3.36 does this, even for the "cd" command, since launching it in a subshell can't change the CWD for the parent process. Thank you. Matthew Giassa, MASc, BASc, EIT Se

RE: Forcing builtins (interactive, non-interactive shells) to execute in fork()'ed process.

2016-10-26 Thread Matthew Giassa
I figured it out. Turns out PS1 wasn't set. Interesting how this impacts interactive process fork behavior (maybe it runs some things the way non-interactive processes would normally be launched)? Matthew Giassa, MASc, BASc

Re: Forcing builtins (interactive, non-interactive shells) to execute in fork()'ed process.

2016-10-27 Thread Matthew Giassa
This help request can safely be ignored. It turned out to be an error in a test script causing certain commands to be issued in subshells. Cheers! On 2016-10-26 05:49 PM, Eduardo Bustamante wrote: Hi Matthew, I have a couple questions: 1. How are you testing this? (small concrete cases are