edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] download background
@ 2015-01-09 21:01 Karl Dahlke
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Dahlke @ 2015-01-09 21:01 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Ok I made some progress on this, sort of - well maybe not.
There is now a bg (toggle) command to have downloads
run in background or foreground.
You get the progress dots in foreground.
Put bg in your init function if you normally want background downloads.
But ... https background still doesn't work.
It's a new error message this time.

SSL connect error in libcurl: A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot.

I wonder if I have to close down curl completely in child, then re initialize it.
It just shouldn't be this hard.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Edbrowse-dev] download background
@ 2015-01-10  8:37 Karl Dahlke
  2015-01-10  9:43 ` Chris Brannon
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-01-10  8:37 UTC (permalink / raw)
  To: Edbrowse-dev

Further exploration of download in background fron a secure site:
I did finally get it to work, but I had to free all curl resources,
global cleanup, global init, and reset all the curl attributes
from start to the point of the https download.
But ... after the download, the child process was so corrupted
it couldn't even exit without seg fault.
I looked in curl.h and it says very clearly that
the global init function should be called "exactly once",
and the same for global cleanup.
Clearly I wasn't doing that, so all bets are off!
But that is the only way to get the secure download to work
in the child process.
I think this is a problem we can't solve or work around.
I also think it is primarily in ssl.
Nobody else seems to have this problem,
and I am on an older version of openssl,
so instead of spinning my wheels,
I think I should just document that download in background from secure sites
may not work on openssl version less than 1.0.1g,
and move on to other projects.
We've done this in other respects;
edbrowse just doesn't work with curl version < 7.26, or with pcre < something.
So I think this is reasonable, if indeed the problem is in ssl,
and fixed in recent versions of ssl.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-10 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-09 21:01 [Edbrowse-dev] download background Karl Dahlke
2015-01-10  8:37 Karl Dahlke
2015-01-10  9:43 ` Chris Brannon
2015-01-10 15:11   ` Adam Thompson

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 NNTP newsgroup(s).