[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Matthew Giassa
Subject: Question: is this a bug in BASh (pre-exec trap)
Date: Fri, 09 Sep 2016 11:00:18 -0700
User-agent: Workspace Webmail 6.4.8

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 causes
background subshells to kill the current session:

# Causes login shells to logout
# Look like bash versions > 4.2.46
set -o functrace > /dev/null 2>&1
no_op() { :;}
trap 'no_op' DEBUG;
# Any command in a subshell and background
( pwd ) & 

Is this a bug or issue in BASh itself, or is it simply a limitation of
using pre-exec functionality?

Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]