# HG changeset patch # User Chris Cannam # Date 1290441733 0 # Node ID af7cf6f7282cfd1d1d6190e30bd1fb1acd4e6cef # Parent b0a90ac84b8b8eafd6ef34c0a67346f0d5ee2c72 * ioctl fixes for OS/X diff -r b0a90ac84b8b -r af7cf6f7282c common.cpp --- a/common.cpp Mon Nov 22 15:30:39 2010 +0000 +++ b/common.cpp Mon Nov 22 16:02:13 2010 +0000 @@ -159,11 +159,11 @@ DEBUG << "stdin is a terminal, detaching from it" << endl; if (ioctl(0, TIOCNOTTY, NULL) < 0) { perror("ioctl failed"); - DEBUG << "ioctl for TIOCNOTTY failed (errno = " << errno << ")" << endl; + DEBUG << "ioctl for TIOCNOTTY on stdin failed (errno = " << errno << ")" << endl; } else { - DEBUG << "ioctl for TIOCNOTTY succeeded" << endl; + DEBUG << "ioctl for TIOCNOTTY on stdin succeeded" << endl; + return; } - return; } int ttyfd = open("/dev/tty", O_RDWR); @@ -172,11 +172,11 @@ } else { if (ioctl(ttyfd, TIOCNOTTY, NULL) < 0) { perror("ioctl failed"); - DEBUG << "ioctl for TIOCNOTTY failed (errno = " << errno << ")" << endl; + DEBUG << "ioctl for TIOCNOTTY on controlling terminal failed (errno = " << errno << ")" << endl; } else { - DEBUG << "ioctl for TIOCNOTTY succeeded" << endl; + DEBUG << "ioctl for TIOCNOTTY on controlling terminal succeeded" << endl; + return; } - return; } #endif