[M3devel] file descriptor confusion?
Olaf Wagner
wagner at elegosoft.com
Tue Dec 14 11:03:08 CET 2010
Quoting Mika Nystrom <mika at async.caltech.edu>:
> Hi m3devel,
>
> Still fiddling with I386_DARWIN.
>
> I've been able to get everything that I need compiling with the release
> compiler so I haven't upgraded to the head yet. I'm trying hard to
> get a new product ready and am already behind, was hoping I could debug
> my own code on this new laptop... Maybe soon (actually I have already
> found a bug in my own code under the compiler so I shouldn't complain).
>
> But I've run into a mystery that I think may be due to some change in CM3,
> but it might also be a bug of mine, so please just let me know if there
> *might* have been some changes that could have had the following effect.
>
> My code uses a pretty elaborate debugging framework with a "Debug"
> module that prints debug messages and conditionally can turn on and
> off various input streams (types of debug messages) and output streams
> (targets: terminal, files, etc.)
>
> I have a program that connects over TCP to a server, using Wr and Rd on
> ConnFD.T, TCP.T, and such objects. I am now finding that my debug
> output is going to the server! It's supposed to be a completely separate
> stream. It looks like the file descriptors have gotten confused. Maybe.
>
> Does this ring a bell for anyone? Sometime in the last year I would guess.
> Code works perfectly under PM3 (as always). If it does ring a bell
> anywhere, what are the chances it's different in the head?
I think the main differences that one should look at are these two:
o CM3 now uses a different threading implementation on most platforms
(operating system (p)threads), and not self-implemented user threads
any more.
o Process.Create has been changed in order to cope with the change above,
IIRC. All user threads used to be duplicated by fork, whereas the
pthreads now need to be restarted in the child process. Please correct
me if I remember this wrong, Jay.
There's nothing more specific I can think of though that would explain
the behaviour.
Olaf
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list