/[gentoo-x86]/eclass/multiprocessing.eclass
Gentoo

Diff of /eclass/multiprocessing.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.5
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/multiprocessing.eclass,v 1.4 2013/11/28 20:49:14 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multiprocessing.eclass,v 1.5 2013/12/03 08:15:14 vapier Exp $
4 4
5# @ECLASS: multiprocessing.eclass 5# @ECLASS: multiprocessing.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
224# Find a free fd and redirect the specified file via it. Store the new 224# Find a free fd and redirect the specified file via it. Store the new
225# fd in the specified variable. Useful for the cases where we don't care 225# fd in the specified variable. Useful for the cases where we don't care
226# about the exact fd #. 226# about the exact fd #.
227redirect_alloc_fd() { 227redirect_alloc_fd() {
228 local var=$1 file=$2 redir=${3:-"<>"} 228 local var=$1 file=$2 redir=${3:-"<>"}
229
230 # Make sure /dev/fd is sane. #479656
231 if [[ ! -L /dev/fd ]] ; then
232 eerror "You're missing a /dev/fd symlink to /proc/self/fd."
233 eerror "Please fix the symlink and check your boot scripts (udev/etc...)."
234 die "/dev/fd is broken"
235 fi
229 236
230 if [[ $(( (BASH_VERSINFO[0] << 8) + BASH_VERSINFO[1] )) -ge $(( (4 << 8) + 1 )) ]] ; then 237 if [[ $(( (BASH_VERSINFO[0] << 8) + BASH_VERSINFO[1] )) -ge $(( (4 << 8) + 1 )) ]] ; then
231 # Newer bash provides this functionality. 238 # Newer bash provides this functionality.
232 eval "exec {${var}}${redir}'${file}'" 239 eval "exec {${var}}${redir}'${file}'"
233 else 240 else

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20