delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/19/01:42:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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?= <mikas493 AT student DOT liu DOT se>
To: <cygwin AT cygwin DOT com>
Subject: Ghost process
Date: Wed, 19 Feb 2003 07:47:53 +0100
MIME-Version: 1.0
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 <GL/glut.h>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019