From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] [PATCH] shell commands are now run in a child process
Date: Tue, 05 Feb 2008 09:34:12 -0800 [thread overview]
Message-ID: <1202232814-sup-1005@south> (raw)
In-Reply-To: <1202026272-3432-2-git-send-email-chrisw@rice.edu>
Reformatted excerpts from Christopher Warrington's message of 2008-02-03:
> When shelling out, the external command is now run in a child process.
> Before the external command is run, all (I hope) of sup's open files
> are closed first.
This seems crazy. Do mbox sources even continue to function properly
once this has happened? It seems like they'd crash with their file
handles closed from under them.
If the issue is that Windows has bad behavior when Sup polls while
you're editing a message, another option might be to turn off polling
when Sup is shelled out.
Something like (although this doesn't prevent you from starting an
editor while a background poll is in progress):
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index d40a626..96f676b 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -137,6 +137,7 @@ class BufferManager
include Singleton
attr_reader :focus_buf
+ bool_reader :shelled
## we have to define the key used to continue in-buffer search here, because
## it has special semantics that BufferManager deals with---current searches
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
index 2dd9150..a67e801 100644
--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -45,7 +45,8 @@ EOS
end
def poll
- return if @polling
+ return if @polling || BufferManager.shelled?
+
@polling = true
HookManager.run "before-poll"
--
William <wmorgan-sup at masanjin.net>
next prev parent reply other threads:[~2008-02-05 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 8:11 Christopher Warrington
2008-02-05 17:34 ` William Morgan [this message]
2008-02-05 19:29 ` Christopher Warrington
2008-02-05 20:12 ` William Morgan
2008-02-08 9:40 ` Christopher Warrington
2008-02-19 17:48 ` William Morgan
2008-02-25 17:48 William Morgan
2008-03-01 4:42 ` Christopher Warrington
2008-03-01 20:37 ` William Morgan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202232814-sup-1005@south \
--to=wmorgan-sup@masanjin.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox