- ; Maybe put a vhangup here?
- #-glibc2
- (alien:with-alien ((stuff (alien:struct unix:sgttyb)))
- (let ((sap (alien:alien-sap stuff)))
- (unix:unix-ioctl slave-fd unix:TIOCGETP sap)
- (setf (alien:slot stuff 'unix:sg-flags) #o300) ; EVENP|ODDP
- (unix:unix-ioctl slave-fd unix:TIOCSETP sap)
- (unix:unix-ioctl master-fd unix:TIOCGETP sap)
- (setf (alien:slot stuff 'unix:sg-flags)
- (logand (alien:slot stuff 'unix:sg-flags)
+ ;; comment from classic CMU CL:
+ ;; Maybe put a vhangup here?
+ ;;
+ ;; FIXME: It seems as though this logic should be in
+ ;; OPEN-PTY, not FIND-A-PTY (both from the comments
+ ;; documenting DEFUN FIND-A-PTY, and from the
+ ;; connotations of the function names).
+ ;;
+ ;; FIXME: It would be nice to have a note, and/or a pointer
+ ;; to some reference material somewhere, explaining
+ ;; why we need this on *BSD and not on Linux.
+ #+bsd
+ (sb-alien:with-alien ((stuff (sb-alien:struct sgttyb)))
+ (let ((sap (sb-alien:alien-sap stuff)))
+ (sb-unix:unix-ioctl slave-fd sb-unix:TIOCGETP sap)
+ (setf (sb-alien:slot stuff 'sg-flags)
+ ;; This is EVENP|ODDP, the same numeric code
+ ;; both on FreeBSD and on OpenBSD. -- WHN 20000929
+ #o300) ; EVENP|ODDP
+ (sb-unix:unix-ioctl slave-fd sb-unix:TIOCSETP sap)
+ (sb-unix:unix-ioctl master-fd sb-unix:TIOCGETP sap)
+ (setf (sb-alien:slot stuff 'sg-flags)
+ (logand (sb-alien:slot stuff 'sg-flags)
+ ;; This is ~ECHO, the same numeric
+ ;; code both on FreeBSD and on OpenBSD.
+ ;; -- WHN 20000929