Bug 2181

Summary: claws hangs if gpg smartcard not present
Product: Claws Mail (GTK 2) Reporter: Laurent Bigonville <bigon>
Component: Plugins/Privacy/PGPAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 3.7.4   
Hardware: PC   
OS: Linux   

Description Laurent Bigonville 2010-04-20 10:33:40 UTC
Hi,

My gpg keys are stored on a smartcard, this is working fine with claws-mail.

But if I forgot to insert my card before sending a mail, claws hangs without any message.

Doing a strace on claws-mail show:

select(36, [29 35], [], NULL, {1, 0})   = 1 (in [29], left {0, 999993})
select(30, [29], [], NULL, {0, 0})      = 1 (in [29], left {0, 0})
read(29, "[GNUPG:] GOT_IT\n[GNUPG:] CARDCTR"..., 1024) = 80
fcntl(32, F_GETFL)                      = 0x801 (flags O_WRONLY|O_NONBLOCK)
fcntl(32, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
select(36, [29 35], [32], NULL, {1, 0}) = 1 (out [32], left {0, 999993})
select(33, [], [32], NULL, {0, 0})      = 1 (out [32], left {0, 0})
write(32, "\n", 1)                      = 1


There is also a gpg process taking lot of cpu.

Inserting the card at this point is working.

It could be nice to show a message or something in this case to inform the user.
Comment 1 Laurent Bigonville 2013-05-30 11:53:30 UTC
Hello,

This is still happening and quite annoying if you don't have your GPG card around and you forgot to uncheck the "sign" checkbox.

The only way to unblock claws is to kill the gpg process

</this was a ping message>
Comment 2 Colin Leroy 2013-05-30 12:00:53 UTC
Hi Laurent,

sorry for the lack of answer. I don't know how that can be fixed at the Claws Mail level, where we just call gpgme_op_sign()... 

Maybe this is something the GPG agent can do.