Bruno Haible writes:
> I'm committing this, clarifying that the master file descriptor needs to be
> closed before the slave file descriptor:
Thanks. I may get access to a newer Mac relatively soon, and I'll test
it on that machine as well.
/Simon
Hi Simon,
> The stand-alone program below reproduces the Mac OS X bug:
>
> espresso:~ jas$ cc -Wall -o test-openpty test-openpty.c
> espresso:~ jas$ ./test-openpty master
> Closing master: 0
> espresso:~ jas$ ./test-openpty slave
> ^C
> espresso:~ jas$ ./test-openpty
> ^C^Z^C^Z^C^Z^C^Z
> Bruno,
Bruno Haible writes:
o> Hi Simon,
>
>> Now the test-openpty self-test hangs on my Mac OS X machine, and the
>> process doesn't even go away from the process table after a 'kill -9'.
>> Here is a gdb session, which suggests it hangs when shutting down the
>> process:
>
> Strange. This program now
Hi Simon,
> Now the test-openpty self-test hangs on my Mac OS X machine, and the
> process doesn't even go away from the process table after a 'kill -9'.
> Here is a gdb session, which suggests it hangs when shutting down the
> process:
Strange. This program now uses the MacOS built-in openpty fu
Bruno Haible writes:
> Simon Josefsson wrote:
>> HAVE_OPENPTY is not set in config.h though -- isn't that a bug? The
>> system has openpty.
>> ...
>> Single stepping rpl_openpty:
>>
>> master = open ("/dev/ptmx", O_RDWR | O_NOCTTY);
>> if (master < 0)
>> => return -1;
>>
>> And indeed my
Simon Josefsson wrote:
> HAVE_OPENPTY is not set in config.h though -- isn't that a bug? The
> system has openpty.
> ...
> Single stepping rpl_openpty:
>
> master = open ("/dev/ptmx", O_RDWR | O_NOCTTY);
> if (master < 0)
> => return -1;
>
> And indeed my Mac OS X system doesn't have /dev/p
Bruno Haible writes:
>> This is from a package created with './gnulib-tool --dir m
>> --create-testdir --with-tests forkpty'
>
> The only version of MacOS X I have access to is 10.5, and on this
Mine is a powerpc system, maybe it could explain the difference?
> system it works fine, both with t
Hi Simon,
Thanks for testing.
> The forkpty code builds fine as a part of InetUtils on Mac OS X. I
> tried the gnulib self-checks for forkpty, but they failed:
>
> Making check in gltests
> make check-recursive
> make check-TESTS
> PASS: test-alignof
> PASS: test-errno
> PASS: test-fcntl-h
> P
(I'm adding bug-gnulib to the discussion, maybe it can move over there
completely.)
The forkpty code builds fine as a part of InetUtils on Mac OS X. I
tried the gnulib self-checks for forkpty, but they failed:
Making check in gltests
make check-recursive
make check-TESTS
PASS: test-alignof
PAS