Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ncar!boulder!ccncsu!longs.LANCE.ColoState.Edu!steved From: steved@longs.LANCE.ColoState.Edu (Steve Dempsey) Newsgroups: comp.unix.questions Subject: Re: Making a popen replacement with vfork() Message-ID: <6277@ccncsu.ColoState.EDU> Date: 2 May 90 18:07:58 GMT References: <6830@jarthur.Claremont.EDU> Sender: news@ccncsu.ColoState.EDU Reply-To: steved@longs.LANCE.ColoState.Edu (Steve Dempsey) Organization: Engineering College, Colorado State University Lines: 26 In article <6830@jarthur.Claremont.EDU>, jseidman@jarthur.Claremont.EDU (James Seidman) writes: > I'm working on a program which uses popen() several times to run on an > ULTRIX workstation. ... My problem is that every time a popen() > occurs, the system grinds to a halt. What I suspect is happening is that > popen() calls fork()... I've just looked at the source and it is indeed fork(). > Since the system is ULTRIX I can't > just pull it out of the BSD source, of course. It's certainly worth a try. Before we had Ultrix source, I often used BSD source to replace uncooperative pieces of Ultrix, both kernel and user code. In this case, the diffs between Ultrix3.1 and 4.3BSD (MORE/BSD) versions of /usr/src/sys/lib/libc/gen/popen.c are minimal. If that fails, you should be able to roll your own popen() using pipe(), vfork(), and exec?() to suit your application. Steve Dempsey, Center for Computer Assisted Engineering Colorado State University, Fort Collins, CO 80523 +1 303 491 0630 INET: steved@longs.LANCE.ColoState.Edu, dempsey@handel.CS.ColoState.Edu UUCP: boulder!ccncsu!longs.LANCE.ColoState.Edu!steved, ...!ncar!handel!dempsey