Another way to fix subshell problem on AIX

Sergey Pavlukhin psi at dmng.ru
Wed Sep 25 04:26:29 UTC 2002


Hi, Gentlemen

I had subshell problem on AIX, which I fixed with the following patch:
http://mail.gnome.org/archives/mc-devel/2002-April/msg00005.html

Everything was fine. But when I installed AIX 4.3.3 on my computer mc
started to hang from time to time.

So I found another way to fix the problem

- sources: mc-4.6.0-pre1 sources
- oslevel: 4.3.3.0
- gcc version 2.95.3 20010315 (release)

The origianl lines in subshell.c (started line 1130):

#ifdef HAVE_GETPT
    /* getpt () is a GNU extension (glibc 2.1.x) */
    pty_master = getpt ();
#else
    strcpy (pty_name, "/dev/ptmx");
    pty_master = open (pty_name, O_RDWR);
#endif
    if (pty_master == -1)
 return -1;

Were replaced with:

#ifdef HAVE_GETPT
    /* getpt () is a GNU extension (glibc 2.1.x) */
    pty_master = getpt ();
#elif IS_AIX
    strcpy (pty_name, "/dev/ptc");
    pty_master = open (pty_name, O_RDWR);
#else
    strcpy (pty_name, "/dev/ptmx");
    pty_master = open (pty_name, O_RDWR);
#endif
    if (pty_master == -1)
 return -1;


As for mc-4.6.0-pre1 sources, I also had to fix the ftpfs directory proble
as it was described in
http://mail.gnome.org/archives/mc-devel/2002-June/msg00036.html

Regards

Sergey Pavlukhin




More information about the mc-devel mailing list