From: vonbane AT my-deja DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: popen hanging eventually Date: Wed, 06 Dec 2000 15:34:39 GMT Organization: Deja.com - Before you buy. Lines: 60 Message-ID: <90lmag$b9b$1@nnrp1.deja.com> References: <90ljch$8js$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: 206.146.104.2 X-Article-Creation-Date: Wed Dec 06 15:34:39 2000 GMT X-Http-User-Agent: Mozilla/4.75 [en] (WinNT; U) X-Http-Proxy: 1.0 x66.deja.com:80 (Squid/1.1.22) for client 206.146.104.2 X-MyDeja-Info: XMYDJUIDvonbane To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com pclose returns 4 on every loop after the first one that hangs like this as well In article <90ljch$8js$1 AT nnrp1 DOT deja DOT com>, vonbane AT my-deja DOT com wrote: > the tmp file created by popen is empty when this happens. > > rsh is compiled by some other compiler. it is a remote shell program > that alows you to log on to a remote machine and run commands there. in > this instance i am telling it to basically spit out the contents of a > file (binary) to stdout, which therefore is caught be popen. i then > write the results to a file locally. basically i am copying a file from > one machine to the other. as far as i know the rsh uses tcp/ip to do > its networking. > > i post another reply earlier that this does not seem to happen when > running in pure dos, only in windows so windows is somehow preventing > this from happeneing to many times, or if i'm running into some kind of > limit. > > In article , > djgpp AT delorie DOT com wrote: > > > > On Wed, 6 Dec 2000 vonbane AT my-deja DOT com wrote: > > > > > in dos mode it works fine, its only when running it from a dos > window in > > > windows when the problem occurs. its usually been around 12-13 > loops > > > before it fails to read anything from the pfp file pointer. > > > > Modify your program to pause when the problem happens (e.g., by > > calling `getch'). Then open another DOS box, look at the temporary > > file created by `popen', and tell what does it contain. > > > > (You can find the temporary file used by `popen' in the `tmp' > > subdirectory of the DJGPP installation directory, by sorting the files > > there by their creation time.) > > > > Also, what kind of program is `rsh'? Is it a Windows program, a DJGPP > > program, or compiled with some other compiler? You say that it works > on > > DOS, so I guess it's not a Windows program; in that case, what network > > library does it use to connect to the Unix host? > > > > Sent via Deja.com http://www.deja.com/ > Before you buy. > Sent via Deja.com http://www.deja.com/ Before you buy.