From: "Ara.T.Howard" Date: 2005-09-17T07:01:35+09:00 Subject: Re: sending EOF portably On Sat, 17 Sep 2005, Robert Klemme wrote: > Ara.T.Howard wrote: >> any way to send EOF down a pipe/io object in a portable fashion? i >> want to signal EOF to another process w/o closing/reopen. > > There seems to be ETX, EOT, EM, FS... in ASCII but I dunno how portable that > is. > http://www.lookuptables.com/ yeah... but you can't actually send those... > If you control both processes you can use whatever convention you like. > Other than that it'll be difficult. i don't think i can - the input/output could be any binary data so no sequence of chars will do. > Btw, why do you want to do that? A named pipe where you want to disconnect > a listener but keep the pipe is about the only reasonable scenario that I > can think of at the moment. see my acgi posts. right now i have to do open environment load environment close environment open stdin new cgi using redirected stdin close stdin open stdout open stderr redirect stdout redirect stderr yield cgi close stdout close stderr basically i need to be able to do io.close io.clearerr io.read in both reading/writing scenarios. i'm working on a clearerr module now ;-) cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | Your life dwells amoung the causes of death | Like a lamp standing in a strong breeze. --Nagarjuna ===============================================================================