IRIX fixes, sort of partly work.

This commit is contained in:
Nicholas Marriott
2008-06-23 21:54:48 +00:00
parent 14d7cf3878
commit e704d6aee2
5 changed files with 138 additions and 8 deletions

View File

@ -1,7 +1,7 @@
/* $Id: forkpty-sunos.c,v 1.5 2008-06-18 22:21:51 nicm Exp $ */
/* $Id: forkpty-sunos.c,v 1.6 2008-06-23 21:54:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -17,6 +17,7 @@
*/
#include <sys/types.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdlib.h>
@ -52,8 +53,10 @@ forkpty(int *master,
close(*master);
setsid();
#ifdef TIOCSCTTY
if (ioctl(slave, TIOCSCTTY, NULL) == -1)
fatal("ioctl failed");
#endif
if (ioctl(slave, I_PUSH, "ptem") == -1)
fatal("ioctl failed");