From: Anderson Newsgroups: comp.os.msdos.djgpp Subject: How to switch popen read/write modes? Date: Tue, 28 Nov 2000 01:26:55 -0200 Organization: Pennsylvania College of Technology Lines: 16 Message-ID: <3A2325FF.A38B511D@sigmanet.com.br> NNTP-Posting-Host: 200.245.19.214 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi guys! I'm trying out with popen function. It says (at help file) that it can open a program for reading and writing handle = popen ("program", "rb+") I've write a test, but it happens that, if I start with writing property, I can't read the output, and vice-versa. The help mentions that I must call rewind, fflush or fseek before switching, but *how* can I switch? And, if a rewind, I will not loose the output from my first writing? Oh, before someone tell me this question woulb be better aswered at a unix group, I'm using rhide+djgpp (dos), and probably (imho) it works diferently. (I've also checked old messages posted in this group). Thanks in advance. Anderson.