emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "^D^H^H" in process output on Darwin


From: YAMAMOTO Mitsuharu
Subject: Re: "^D^H^H" in process output on Darwin
Date: Sat, 17 Sep 2005 10:33:19 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Tue, 13 Sep 2005 17:21:10 +0900, Nozomu Ando <address@hidden> said:

>> (It actually hangs on Mac OS X 10.1.5 and 10.2.8 if
>> process-connection-type is set to t.  On Mac OS X 10.3.9 it seems
>> not to hang.  Are there any other problems with vfork on Mac OS X
>> 10.3, which is based on Darwin 7?)

> A restriction of setsid(2) after vfork(2) may affect Emacs.

> http://homepage.mac.com/nand/macosx/vfork_setsid.html

Thanks for the info.  I'm not sure if it is a real issue for Emacs or
not, but maybe vfork should be avoided for now just to be on the safe
side.

I think I'll move the child_setup_tty call to before (v)fork only for
the case that the tty is not reopened in the child process.  Any
ideas/objections?

                                     YAMAMOTO Mitsuharu
                                address@hidden

Index: src/process.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/process.c,v
retrieving revision 1.463
diff -c -r1.463 process.c
*** src/process.c       15 Aug 2005 08:44:53 -0000      1.463
--- src/process.c       17 Sep 2005 01:19:14 -0000
***************
*** 1793,1798 ****
--- 1793,1804 ----
  #endif
        if (forkin < 0)
        report_file_error ("Opening pty", Qnil);
+ #if defined (RTU) || defined (UNIPLUS) || defined (DONT_REOPEN_PTY)
+       /* In the case that vfork is defined as fork, the parent process
+        (Emacs) may send some data before the child process completes
+        tty options setup.  So we setup tty before forking.  */
+       child_setup_tty (forkout);
+ #endif /* RTU or UNIPLUS or DONT_REOPEN_PTY */
  #else
        forkin = forkout = -1;
  #endif /* not USG, or USG_SUBTTY_WORKS */
***************
*** 2077,2084 ****
--- 2083,2092 ----
  #endif /* SIGCHLD */
  #endif /* !POSIX_SIGNALS */
  
+ #if !defined (RTU) && !defined (UNIPLUS) && !defined (DONT_REOPEN_PTY)
        if (pty_flag)
          child_setup_tty (xforkout);
+ #endif /* not RTU and not UNIPLUS and not DONT_REOPEN_PTY */
  #ifdef WINDOWSNT
        pid = child_setup (xforkin, xforkout, xforkout,
                           new_argv, 1, current_dir);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]