help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] backgrounding a process sends it into a tailspin


From: Dan Douglas
Subject: Re: [Help-bash] backgrounding a process sends it into a tailspin
Date: Fri, 07 Sep 2012 21:52:05 -0500
User-agent: KMail/4.8.3 (Linux/3.4.6-pf+; KDE/4.8.3; x86_64; ; )

Here is the same script with various issues corrected:

#!/usr/bin/env bash

logger()
    if [[ -x $IMG_TRACK ]]; then 
        "$IMG_TRACK" "$1" gnuplot-4.4.3 "$BASH_SOURCE" "$@"
    fi

IMG_TRACK=${IMG_TRACK:-/usr/local/tools/imgtrack-1.0/bin/imgtrack}
trap 'logger END' EXIT
logger BEGIN
/usr/local/tools/gnuplot-4.4.3/bin/gnuplot.real "$@"

--

These are very unlikely the source of the problem.

Another unlikely possibility: I don't know what gnuplot does with stdin, but 
there are a couple bash-specific quirks involving background jobs reading from 
stdin. You might try adding a redirect to the line that runs gnuplot, i.e.

.../gnuplot.real "$@" </dev/null

It would also be helpful to know what OS is being used, and on what arch.

-- 
Dan Douglas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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