delorie.com/archives/browse.cgi | search |
Christopher Faylor-8 wrote: > >>I suspect more a borderline cygwin issue that octave is just hitting. >>But of course I could be wrong. > > Sure it could be but adding a band-aid to work around the issue is not > the way to go. > So we have sequence 1. popen 2. fclose 3. pclose that is done by octave, not directly for purpose, might be for convenience. And I do not what we should expect from 2. and 3. Should fclose() complain or close the pipe? Is pclose() supposed to wait for the child even if the file was closed? Sometimes its handy to signal EOF to the child (fclose?), do some independent work and then wait for the childs exit status (popen?). Well, sequence 1.2.3. does not look like to serve this purpose since (I think) fclose(fp) is supposed to free the FILE structure so that fp is invalid afterwards :-( The safest seems if fclose complains(?) and does free the FILE structure. If it sends EOF, would be nice. What actually Linux does? Jan -- View this message in context: http://old.nabble.com/debugging-SIGSEV-on-pclose-tp32400695p32427575.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |