Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <003901c2d7e2$d3936c30$70eaec82@mindcooler> From: =?iso-8859-1?Q?Mikael_=C5sberg?= To: Subject: Ghost process Date: Wed, 19 Feb 2003 07:47:53 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1123 X-Spam-Status: No, hits=0.8 required=5.0 tests=FROM_ENDS_IN_NUMS,INVALID_MSGID, LIU_FROM_MATCHES_LIUSTUDENT,SPAM_PHRASE_01_02,USER_AGENT_OE version=2.41-liu_1.3 X-Spam-Level: Hello. I am trying to teach myself basic Open GL programming (using the C language) and I've run into an annoying problem. Consider the following simple Open GL-program. /* simple1_1.c */ #include void display() { glClear( GL_COLOR_BUFFER_BIT ); glBegin( GL_POLYGON ); glVertex2f( -0.5, -0.5 ); glVertex2f( -0.5, 0.5 ); glVertex2f( 0.5, 0.5 ); glVertex2f( 0.5, -0.5 ); glEnd(); glFlush(); } int main( int argc, char** argv ) { glutInit( &argc, argv ); glutCreateWindow( "simple 1-1" ); glutDisplayFunc( display ); glutMainLoop(); return 0; } I compile this program using gcc: gcc -g -Wall -o simple1_1 simple1_1.c -lopengl32 -lglu32 -lglut32 It compiles and links without errors, and when I run it it works as intended. However, there is one annoying problem. If I close the program by pressing the little x-button in the upper right corner, it's not terminated properly. I noticed this when I ran the program, closed it and made some changes to the code. When I tried to compile&link an executable couldn't be created because simple1_1.exe was already in use. I fired up the task manager and found simple1_1.exe in the list of processes and had to terminate there. So, by just pressing the close-button doesn't terminate the program properly, but leaves a ghost process. My question is: Why does it leave a "ghost process" and how do make it not do that? // Mikael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/