Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!serval!yoda.eecs.wsu.edu!wbonner From: wbonner@yoda.eecs.wsu.edu (Wim Bonner) Newsgroups: comp.os.os2.programmer Subject: Re: Multi-threaded appl & printf Message-ID: <1991May17.045208.10865@serval.net.wsu.edu> Date: 17 May 91 04:52:08 GMT References: <1991May16.153241.11420@grasp1.univ-lyon1.fr> Sender: news@serval.net.wsu.edu (USENET News System) Organization: Washington State University Lines: 19 In article <1991May16.153241.11420@grasp1.univ-lyon1.fr> wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) writes: >Is following correct (OS/2 1.2EE / IBM C/2 1.1): > >The main thread of an application creates a second thread (with >DosCreateThread) that uses printf to display some text. The .obj >file is linked to llibcmt & doscalls. Are you using MSC 6.0? If so, instead of using DosCreateThread, use the MS Call _beginthread which is designed so that it will allow the things in the C Runtime Library to work correctly. I had a similar problem and it took me some time to figure out, and mostly because of the backwards way the MSC Manuals are arranged. Wim. -- | wbonner@yoda.eecs.wsu.edu | The Loft BBS | 27313853@wsuvm1.csc.wsu.edu | (509)335-4339 | 72561.3135@CompuServe.com | USR HST Dual Standard HST/V.32