bug on SunOS 4
- From: David Monniaux <monniaux clipper ens fr>
- To: GTK+ list <gtk-list redhat com>
- Subject: bug on SunOS 4
- Date: Thu, 2 Apr 1998 18:52:09 +0200 (MET DST)
getcwd() is broken on SunOS 4. That results in gimp freezing X when
selecting "Open" from the file menu.
Here underneath is a patch to have Gtk use getwd() instead.
Observation: the X freeze is due to some grab being released too late.
It is a bad idea IMHO to do file I/O while have a X grab.
That grab should therefore be released quicker.
As for the source of the bug with getcwd() on SunOS 4, it is some
neverending wait4(). getcwd on SunOS 4 (contrary to getwd) is implemented
with a pipe() and vfork() (the actual function runs in another process).
The signal handling after this is badly done, maybe interfering with the
one for GTK.
-- David
diff -cr gtk+-0.99.9-unpatched/gtk/gtkfilesel.c
gtk+-0.99.9/gtk/gtkfilesel.c
*** gtk+-0.99.9-unpatched/gtk/gtkfilesel.c Fri Mar 27 17:50:44 1998
--- gtk+-0.99.9/gtk/gtkfilesel.c Thu Apr 2 17:46:51 1998
***************
*** 1504,1510 ****
new_state = g_new (CompletionState, 1);
! if (!getcwd (getcwd_buf, MAXPATHLEN))
{
cmpl_errno = errno;
return NULL;
--- 1504,1510 ----
new_state = g_new (CompletionState, 1);
! if (!getwd (getcwd_buf))
{
cmpl_errno = errno;
return NULL;
***************
*** 2108,2114 ****
gchar buffer[MAXPATHLEN];
gchar buffer2[MAXPATHLEN];
! if(!getcwd(buffer, MAXPATHLEN))
{
cmpl_errno = errno;
return NULL;
--- 2108,2114 ----
gchar buffer[MAXPATHLEN];
gchar buffer2[MAXPATHLEN];
! if(!getwd(buffer))
{
cmpl_errno = errno;
return NULL;
***************
*** 2120,2126 ****
return NULL;
}
! if(!getcwd(buffer2, MAXPATHLEN))
{
chdir(buffer);
cmpl_errno = errno;
--- 2120,2126 ----
return NULL;
}
! if(!getwd(buffer2))
{
chdir(buffer);
cmpl_errno = errno;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]