On Tue 2017-06-06 08:17:23 +0200, Patrick Brunschwig wrote:
> On 05.06.17 17:20, Daniel Kahn Gillmor wrote:
>> i notice that in e68dfc8260ebf976ba50845e794c9fac0d262975 enigmail is
>> now invoking gpg-connect-agent, and then sending it commands on stdin.
>> 
>> if there's no intent to read responses from stdout, you can also pass
>> parameters on the command line.
>> 
>> so instead of:
>> 
>>     gpg-connect-agent
>> 
>> and then writing:
>> 
>>     KILLAGENT
>>     /bye
>> 
>> You can just invoke:
>> 
>>    gpg-connect-agent KILLAGENT /bye
>> 
>> this might be cleaner for simple invocations.
>
> You're right yes. I might change it...

Attached is a patch (untested) if you're still interested in this
cleanup.

        --dkg

>From 5a36eb503f83f015242678711133332555c98ca6 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Date: Wed, 5 Jul 2017 07:25:56 -0700
Subject: [PATCH] use commandline invocations for killagent instead of stdin

---
 package/gpgAgent.jsm | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/package/gpgAgent.jsm b/package/gpgAgent.jsm
index 7bc3a3d1..ef3a71a6 100644
--- a/package/gpgAgent.jsm
+++ b/package/gpgAgent.jsm
@@ -791,14 +791,8 @@ var EnigmailGpgAgent = {
       try {
         const proc = {
           command: EnigmailGpgAgent.connGpgAgentPath,
-          arguments: [],
-          charset: null,
-          environment: EnigmailCore.getEnvList(),
-          stdin: function(pipe) {
-            pipe.write("killagent\n");
-            pipe.write("/bye\n");
-            pipe.close();
-          }
+          arguments: ['killagent', '/bye'],
+          environment: EnigmailCore.getEnvList()
         };
 
         subprocess.call(proc).wait();
-- 
2.13.2

_______________________________________________
enigmail-users mailing list
enigmail-users@enigmail.net
To unsubscribe or make changes to your subscription click here:
https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net

Reply via email to