diff options
author | 2001-08-29 13:52:08 +0000 | |
---|---|---|
committer | 2001-08-29 13:52:08 +0000 | |
commit | 19c99b1f13305b3c27416a80cadee34a82dac662 (patch) | |
tree | b8d95195855b87c6296e480f131c9fd8167345af /Gui/mplayer/widgets.c | |
parent | c9da64ae3e4d1836f89f3ae65404a44df5f707cd (diff) |
fix signalhandling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1743 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer/widgets.c')
-rw-r--r-- | Gui/mplayer/widgets.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index 91089809ed..98bc3c115d 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -59,8 +59,6 @@ void widgetsCreate( void ) Options=create_Options(); } -int gtkParent = 1; - // --- forked function static void gtkThreadProc( int argc,char * argv[] ) @@ -71,9 +69,7 @@ static void gtkThreadProc( int argc,char * argv[] ) widgetsCreate(); -// gtkParentPID=getppid(); -// gtkChildPID=getpid(); - gtkParent=0; + gtkPID=getppid(); signal( SIGTYPE,gtkSigHandler ); @@ -89,9 +85,8 @@ static void gtkThreadProc( int argc,char * argv[] ) void gtkInit( int argc,char* argv[], char *envp[] ) { - gtkParentPID=getpid(); gtkShMem=shmem_alloc( ShMemSize ); - if ( ( gtkChildPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); + if ( ( gtkPID = fork() ) == 0 ) gtkThreadProc( argc,argv ); } void gtkDone( void ){ @@ -99,7 +94,7 @@ void gtkDone( void ){ gtkSendMessage(evExit); usleep(50000); // 50ms should be enough! printf("gtk killed...\n"); - kill( gtkChildPID,SIGKILL ); + kill( gtkPID,SIGKILL ); } void gtkMessageBox( gchar * str ) |