pidgin/gtkmain.c

branch
rlaager.gaim_migration
changeset 16437
7ff7c3405ea2
parent 16419
8a5a3e2cd3a7
child 16446
3a6ed6c3400e
equal deleted inserted replaced
16436:a2852f053d3f 16437:7ff7c3405ea2
143 143
144 #ifdef HAVE_SIGNAL_H 144 #ifdef HAVE_SIGNAL_H
145 static void sighandler(int sig); 145 static void sighandler(int sig);
146 146
147 /** 147 /**
148 * Reap all our dead children. Sometimes Purple forks off a separate 148 * Reap all our dead children. Sometimes libpurple forks off a separate
149 * process to do some stuff. When that process exits we are 149 * process to do some stuff. When that process exits we are
150 * informed about it so that we can call waitpid() and let it 150 * informed about it so that we can call waitpid() and let it
151 * stop being a zombie. 151 * stop being a zombie.
152 * 152 *
153 * We used to do this immediately when our signal handler was 153 * We used to do this immediately when our signal handler was
158 * 158 *
159 * Anyway, so then GStreamer waits for its child to die and then 159 * Anyway, so then GStreamer waits for its child to die and then
160 * it continues with the initialization process. This means that 160 * it continues with the initialization process. This means that
161 * we have a race condition where GStreamer is waitpid()ing for its 161 * we have a race condition where GStreamer is waitpid()ing for its
162 * child to die and we're catching the SIGCHLD signal. If GStreamer 162 * child to die and we're catching the SIGCHLD signal. If GStreamer
163 * is awarded the zombied process then everything is ok. But if Purple 163 * is awarded the zombied process then everything is ok. But if libpurple
164 * reaps the zombie process then the GStreamer initialization sequence 164 * reaps the zombie process then the GStreamer initialization sequence
165 * fails. 165 * fails.
166 * 166 *
167 * So the ugly solution is to wait a second to give GStreamer time to 167 * So the ugly solution is to wait a second to give GStreamer time to
168 * reap that bad boy. 168 * reap that bad boy.
675 675
676 if (migration_failed) 676 if (migration_failed)
677 { 677 {
678 char *old = g_strconcat(purple_home_dir(), 678 char *old = g_strconcat(purple_home_dir(),
679 G_DIR_SEPARATOR_S ".gaim", NULL); 679 G_DIR_SEPARATOR_S ".gaim", NULL);
680 char *text = _( 680 const char *text = _(
681 "Pidgin encountered errors migrating your settings " 681 "Pidgin encountered errors migrating your settings "
682 "from %s to %s. Please investigate and complete the " 682 "from %s to %s. Please investigate and complete the "
683 "migration by hand."); 683 "migration by hand.");
684 GtkWidget *dialog; 684 GtkWidget *dialog;
685 685

mercurial