[Top][All Lists]

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

still popen2 problems

From: Allan E. Strand
Subject: still popen2 problems
Date: 15 Sep 1997 09:53:53 -0600

I sent a vague message to the list a few days ago about popen2.
Having received no response, I decided to post a more specific example
of my problem.

The follwing code comes directly from the octave info pages:

[in, out, pid] = popen2 ("sort", "-nr");
fputs (in, "these\nare\nsome\nstrings\n");
fclose (in);
while (isstr (s = fgets (out)))
  fputs (stdout, s);
fclose (out);

if I execute these comamnds interactively, they _always_ produce the
correct result.  When I place them in a file and call them as a
script, I either get no result at all or a warning that there is a
broken pipe and (of course) no result.

Does anyone have an idea of what the problem might be?


p.s.  NetBSD 1.2.1, P133, octave 2.0.5

Allan E. Strand                Internet:   address@hidden
Department of Biology
New Mexico State University    Phone:      (505) 646-1150
Las Cruces, New Mexico  88003  FAX:        (505) 646-5665

reply via email to

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