|
楼主 |
发表于 2006-1-18 13:12:19
|
显示全部楼层
[php]
////callback on receiving signal SIGUSR1 or SIGUSR2
void
entry_status_update (int sig)
{
if (sig == SIGUSR2)
{
char status[32], iterstr[8];
strcpy (status, " Connecting, ");
sprintf (iterstr, "%d", elapsed_seconds++);
strcat (status, iterstr);
// strcat (status, "seconds"); //增加这一行就出问题,谁知道原因么?
gtk_entry_set_text (GTK_ENTRY (entry_status), status);
return;
}
else if (sig == SIGUSR1)
{
gtk_entry_set_text (GTK_ENTRY (entry_status), " Established");
return;
}
else
fprintf (stderr, "err signal");
return;
}
[/php] |
|