diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-03-27 18:02:49 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-03-27 18:02:49 -0400 |
commit | 0fded72147e60d7193c393e6de68493258501e7a (patch) | |
tree | ccce57b7e59333c8bed5b2e8800a52084e20fe06 /src/share/m/gen_subkey | |
parent | ed615ab0a3f06f102661eae5d399f206bc6afeff (diff) |
trying to make m gen-subkey more responsive in the face of errors, and clearer to the user about what is going on.
Diffstat (limited to 'src/share/m/gen_subkey')
-rw-r--r-- | src/share/m/gen_subkey | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/share/m/gen_subkey b/src/share/m/gen_subkey index a0fa3ce..05004f6 100644 --- a/src/share/m/gen_subkey +++ b/src/share/m/gen_subkey @@ -57,14 +57,16 @@ save" # setup the temp fifo dir for retrieving the key password log debug "creating password fifo..." fifoDir=$(msmktempdir) - trap "rm -rf $fifoDir" EXIT (umask 077 && mkfifo "$fifoDir/pass") - log verbose "generating subkey..." + # FIXME: are we adequately cleaning up any trailing gpg process here? + trap "rm -rf $fifoDir; kill %% || true" EXIT echo "$editCommands" | gpg_user --passphrase-fd 3 3< "$fifoDir/pass" --expert --command-fd 0 --edit-key "$keyID" & + log debug "Prompting for passphrase" # FIXME: this needs to fail more gracefully if the passphrase is incorrect passphrase_prompt "Please enter your passphrase for $keyID: " "$fifoDir/pass" + log info "Generating subkey. This may take a long time..." trap - EXIT rm -rf "$fifoDir" |