ssh and popen-- broken pipe

Lingyun Pan Pan_Lingyun at cat.com
Fri Sep 20 03:21:06 EST 2002


Hi,

My application uses popen to execute UNIX commands.   After I replace rsh
with ssh,  it stopped working.  I have made a test C code to reproduce the
problem as attached in this email.  In the test program, I called popen for
ssh command and then pclose right away.  I got  the following error:

kirk 588$ a.out
Write failed flushing stdout buffer.
write stdout: Broken pipe

Any idea what is going on.  If I call popen with some other commands, it
runs fine.

One more thing worth metioning here is even with ssh, my application was
fine last month on another machine.  Unfortunately, that machine was taken
off the lease and I and trying to trace done the ssh version information.

Thanks in advance.

(See attached file: test_ssh.c)

Ling Pan
309-494-2155 ( tie line 7-724-2155)
Mechanical Analysis Group
Caterpillar Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ssh.c
Type: application/octet-stream
Size: 363 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20020919/dec056d3/attachment.obj 


More information about the openssh-unix-dev mailing list