News for hackers. Stuff that matters.
Re:Taming non-terminating Bash processes by fensipens on Saturday November 08, 2014 @04:56PM (#8578266)
$! is not working with the distributed Bash version (currently 3.2) on OS X.

  $ bash --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
  Copyright (C) 2007 Free Software Foundation, Inc.
  $ : & echo $!
  [1] 329
  329
Re:Taming non-terminating Bash processes by pstadler on Saturday November 08, 2014 @05:06PM (#8578293)
$BASHPID is not working with subshells prior to Bash v4.
Re:Taming non-terminating Bash processes by fensipens on Saturday November 08, 2014 @05:32PM (#8578340)
$BASHPID and $! are two different things.
Re:Taming non-terminating Bash processes by pstadler on Saturday November 08, 2014 @06:06PM (#8578437)
I need to know the PID of the subshell, inside the subshell. $BASHPID was introduced to hold this value. While $$ still contains the PID of the parent process and $! is not available inside the subshell after all.