Re: portable openpty, forkpty

2010-04-25 Thread Simon Josefsson
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

Re: portable openpty, forkpty

2010-04-25 Thread Bruno Haible
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,

Re: portable openpty, forkpty

2010-04-25 Thread Simon Josefsson
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

Re: portable openpty, forkpty

2010-04-24 Thread Bruno Haible
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

Re: portable openpty, forkpty

2010-04-21 Thread Simon Josefsson
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

Re: portable openpty, forkpty

2010-04-15 Thread Bruno Haible
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

Re: portable openpty, forkpty

2010-04-15 Thread Simon Josefsson
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

Re: portable openpty, forkpty

2010-03-28 Thread Bruno Haible
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

Re: portable openpty, forkpty

2010-03-23 Thread Simon Josefsson
(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