Mercurial > hg > xemacs-beta
diff src/process.c @ 251:677f6a0ee643 r20-5b24
Import from CVS: tag r20-5b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:59 +0200 |
parents | 52952cbfc5b5 |
children | 157b30c96d03 |
line wrap: on
line diff
--- a/src/process.c Mon Aug 13 10:19:12 2007 +0200 +++ b/src/process.c Mon Aug 13 10:19:59 2007 +0200 @@ -619,7 +619,7 @@ #else /* no PTY_OPEN */ #ifdef IRIS /* Unusual IRIS code */ - *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0); + *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY | OPEN_BINARY, 0); if (fd < 0) return -1; if (fstat (fd, &stb) < 0) @@ -634,9 +634,9 @@ else failed_count = 0; #ifdef O_NONBLOCK - fd = open (pty_name, O_RDWR | O_NONBLOCK, 0); + fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0); #else - fd = open (pty_name, O_RDWR | O_NDELAY, 0); + fd = open (pty_name, O_RDWR | O_NDELAY | OPEN_BINARY, 0); #endif #endif /* not IRIS */ #endif /* no PTY_OPEN */ @@ -829,15 +829,15 @@ /* You're "supposed" to now open the slave in the child. On some systems, we can open it here; this allows for better error checking. */ -#ifndef USG +#if !defined(USG) /* On USG systems it does not work to open the pty's tty here and then close and reopen it in the child. */ #ifdef O_NOCTTY /* Don't let this terminal become our controlling terminal (in case we don't have one). */ - forkout = forkin = open (pty_name, O_RDWR | O_NOCTTY, 0); + forkout = forkin = open (pty_name, O_RDWR | O_NOCTTY | OPEN_BINARY, 0); #else - forkout = forkin = open (pty_name, O_RDWR, 0); + forkout = forkin = open (pty_name, O_RDWR | OPEN_BINARY, 0); #endif if (forkin < 0) goto io_failure; @@ -870,7 +870,7 @@ { /* child_setup must clobber environ on systems with true vfork. Protect it from permanent change. */ - char **save_environ = environ; + /* char **save_environ = environ;*/ #ifdef EMACS_BTL /* when performance monitoring is on, turn it off before the vfork(), @@ -938,7 +938,7 @@ /* I wonder if close (open (pty_name, ...)) would work? */ if (xforkin >= 0) close (xforkin); - xforkout = xforkin = open (pty_name, O_RDWR, 0); + xforkout = xforkin = open (pty_name, O_RDWR | OPEN_BINARY, 0); if (xforkin < 0) { write (1, "Couldn't open the pty terminal ", 31); @@ -1024,7 +1024,7 @@ cadillac_start_logging (); /* #### rename me */ #endif - environ = save_environ; + /* environ = save_environ;*/ } if (pid < 0) @@ -1277,7 +1277,9 @@ { #ifdef TRY_AGAIN if (count++ > 10) break; - h_errno = 0; +#ifndef BROKEN_CYGWIN + h_errno = 0; +#endif #endif /* Some systems can't handle SIGIO/SIGALARM in gethostbyname. */ slow_down_interrupts (); @@ -3048,7 +3050,7 @@ else { close (XPROCESS (proc)->outfd); - XPROCESS (proc)->outfd = open (NULL_DEVICE, O_WRONLY, 0); + XPROCESS (proc)->outfd = open (NULL_DEVICE, O_WRONLY | OPEN_BINARY, 0); } return process;