multiprocessing.eclass: Remove bashpid function
authorMichał Górny <mgorny@gentoo.org>
Sun, 31 Dec 2017 10:32:03 +0000 (11:32 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 4 Jan 2018 21:56:25 +0000 (22:56 +0100)
Remove the bashpid function that is not used anywhere after the removal
of multijob* logic. The unprefixed name can be quite confusing,
and the function itself is rather unlikely to be useful.

eclass/multiprocessing.eclass

index cfe22303043e07c83b61dba6f77c3f4f4c65c04e..6ca9b4fa78503b3d4f53c0a51fb8d85a8036e9c1 100644 (file)
 if [[ -z ${_MULTIPROCESSING_ECLASS} ]]; then
 _MULTIPROCESSING_ECLASS=1
 
-# @FUNCTION: bashpid
-# @DESCRIPTION:
-# Return the process id of the current sub shell.  This is to support bash
-# versions older than 4.0 that lack $BASHPID support natively.  Simply do:
-# echo ${BASHPID:-$(bashpid)}
-#
-# Note: Using this func in any other way than the one above is not supported.
-bashpid() {
-       # Running bashpid plainly will return incorrect results.  This func must
-       # be run in a subshell of the current subshell to get the right pid.
-       # i.e. This will show the wrong value:
-       #   bashpid
-       # But this will show the right value:
-       #   (bashpid)
-       sh -c 'echo ${PPID}'
-}
-
 # @FUNCTION: get_nproc
 # @USAGE: [${fallback:-1}]
 # @DESCRIPTION: