From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: "^D^H^H" in process output on Darwin
Date: Sat, 17 Sep 2005 10:33:19 +0900 [thread overview]
Message-ID: <wlwtlgfpgg.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <8664t5fkeh.fsf@panel.jk.homeunix.org>
>>>>> On Tue, 13 Sep 2005 17:21:10 +0900, Nozomu Ando <nand@mac.com> 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
mituharu@math.s.chiba-u.ac.jp
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);
next prev parent reply other threads:[~2005-09-17 1:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 15:41 grep-use-null-device Emilio Lopes
2005-08-16 2:25 ` grep-use-null-device Richard M. Stallman
2005-08-16 11:46 ` grep-use-null-device Karl Chen
2005-08-16 16:20 ` grep-use-null-device Emilio Lopes
2005-08-17 6:25 ` grep-use-null-device Richard M. Stallman
2005-08-20 12:22 ` grep-use-null-device Eli Zaretskii
2005-08-27 1:30 ` "^D^H^H" in process output on Darwin (Was Re: grep-use-null-device) YAMAMOTO Mitsuharu
2005-08-29 13:56 ` "^D^H^H" in process output on Darwin Stefan Monnier
2005-09-13 8:21 ` Nozomu Ando
2005-09-17 1:33 ` YAMAMOTO Mitsuharu [this message]
2005-08-29 22:43 ` grep-use-null-device Juri Linkov
2005-08-30 10:30 ` grep-use-null-device Richard M. Stallman
2005-08-31 2:31 ` grep-use-null-device Stefan Monnier
2005-08-31 6:02 ` grep-use-null-device Juri Linkov
2005-09-01 14:59 ` grep-use-null-device Stefan Monnier
2005-09-01 16:16 ` grep-use-null-device David Kastrup
2005-09-01 18:18 ` grep-use-null-device Stefan Monnier
2005-09-03 1:43 ` grep-use-null-device Richard M. Stallman
2005-08-16 7:15 ` grep-use-null-device Emilio Lopes
2005-08-16 9:26 ` grep-use-null-device David Kastrup
2005-08-16 16:29 ` grep-use-null-device Emilio Lopes
2005-08-16 9:45 ` grep-use-null-device Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wlwtlgfpgg.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).