From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24163 invoked by alias); 2 May 2002 15:48:32 -0000 Mailing-List: contact sourcenav-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sourcenav-owner@sources.redhat.com Received: (qmail 24129 invoked from network); 2 May 2002 15:48:31 -0000 Received: from unknown (HELO shasta.pdx.steptech.com) (207.138.226.173) by sources.redhat.com with SMTP; 2 May 2002 15:48:31 -0000 Received: by shasta.pdx.steptech.com with Internet Mail Service (5.5.2653.19) id ; Thu, 2 May 2002 08:47:25 -0700 Message-ID: <26F9F6EAB586D411850700B0D049E6E4014D2FCD@shasta.pdx.steptech.com> From: Bruce Edson To: "Sourcenav (E-mail)" , "Sourcenav-Devl (E-mail)" Subject: Running a separate TCL process using hyper Date: Thu, 02 May 2002 08:48:00 -0000 X-SW-Source: 2002-q2/txt/msg00036.txt.bz2 Sorry for sending this to both mail lists, but I figure until everyone has moved over to the new one at SourceForge I will post to both. We have created a TCL process that will augment the xref tables for Source Navigator. We want to do this so as to be able to cross-reference unique macro method invocations in our code base. As the process takes time we would like to run it in a separate process much the way dbimp runs, although we're using TCL to do this. Now for the problem, we can set up a pipe for hyper to run the TCL script and that seems to work (we use 'open', and the pipe seems to operate in both directions). We would like to use a pipe so that we can monitor progress and update a progress bar. The problem is that we can't find a way to know that the process has exited (to know when its done). The script has the TCL command 'exit 0' at the end. We've tried waiting for eof or for the pid to change, but it never does. We've tried sending back a unique string from the process so that the calling program can then just 'close' the pipe. The 'close' hangs. I'm also left with a hyper process still running in memory for any of these cases, so just not waiting and continuing on, eventually gets me when I try to exit Source Navigator. Can someone give me a suggestion on how to get this hyper process to end and a way to know that it has ended? Thanks. Bruce