/* {{{ Declarations */ #include #include /* for close-on-exec stuff */ #define _XOPEN_SOURCE 1 #define __EXTENSIONS__ 1 /* needed for winsize struct on Solaris (?) */ #include #include #include #include #include #include #include /* For errno, putenv, etc. */ #include /* For errno on SunOS systems */ #include /* tcgetattr(), struct termios, etc. */ #if (!defined(__IBMC__) && !defined(__IBMCPP__)) #include /* Required by unistd.h below */ #endif #include /* For ioctl() (surprise, surprise) */ #include /* For open(), etc. */ #include /* strstr(), strcpy(), etc. */ #include /* sigaction(), sigprocmask(), etc. */ #ifndef SCO_FLAVOR # include /* select(), gettimeofday(), etc. */ #endif /* SCO_FLAVOR */ #include /* For pipe, fork, setsid, access etc */ #ifdef HAVE_SYS_SELECT_H # include #endif /*#ifdef HAVE_SYS_WAIT_H*/ # include /* For waitpid() */ /*#endif*/ #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif #ifdef HAVE_GRANTPT # ifdef HAVE_STROPTS_H # include /* For I_PUSH */ # endif #else # include /* For the group struct & getgrnam() */ #endif #ifdef SCO_FLAVOR # include /* For the group struct & getgrnam() */ #endif /* SCO_FLAVOR */ #include /* For PATH_MAX on FreeBSD. */ #ifdef HAVE_SYS_SYSLIMITS_H #include #endif #ifdef HAVE_SENDMSG #include #include #endif #ifdef HAVE_SYS_UN_H /* Linux libc5 */ #include #endif #include "gnome-login-support.h" #include "vt.h" #include "subshell.h" #include "gnome-pty.h" #include