Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Alex Peshkoff via Firebird-devel
On 2020-09-21 19:11, Dimitry Sibiryakov wrote: 21.09.2020 18:03, Alex Peshkoff via Firebird-devel wrote: The most intresting for us - it's closing all opened sockets (suppose for non-TCP clients something similiar is done). As the result all I/O waits on them are finished at once, therefore if

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Dimitry Sibiryakov
21.09.2020 18:03, Alex Peshkoff via Firebird-devel wrote: The most intresting for us - it's closing all opened sockets (suppose for non-TCP clients something similiar is done). As the result all I/O waits on them are finished at once, therefore if isc_attach_database() was waiting for reply from

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Alex Peshkoff via Firebird-devel
On 2020-09-21 18:31, Dimitry Sibiryakov wrote: 21.09.2020 17:28, Scott Morgan via Firebird-devel wrote: Not as such, but it's relying on undefined behaviour (exiting an app whilst worker threads are still active)   On Windows it is defined behavior. Call to ExitProcess() made by default RTL w

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Scott Morgan via Firebird-devel
On 21/09/2020 16:31, Dimitry Sibiryakov wrote: > 21.09.2020 17:28, Scott Morgan via Firebird-devel wrote: >> Not as such, but it's relying on undefined behaviour (exiting an app >> whilst worker threads are still active) > >   On Windows it is defined behavior. Call to ExitProcess() made by > defa

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Dimitry Sibiryakov
21.09.2020 17:28, Scott Morgan via Firebird-devel wrote: Not as such, but it's relying on undefined behaviour (exiting an app whilst worker threads are still active) On Windows it is defined behavior. Call to ExitProcess() made by default RTL will terminate all other threads. On Linux it

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Scott Morgan via Firebird-devel
On 21/09/2020 16:15, Alex Peshkoff via Firebird-devel wrote: > On 2020-09-21 16:43, Scott Morgan via Firebird-devel wrote: > >> Would it do anything in a normal client situation? >> > > No. And looks like nothing is needed. Do you have any problems on client > when closing application? > Not as

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Alex Peshkoff via Firebird-devel
On 2020-09-21 16:43, Scott Morgan via Firebird-devel wrote: Would it do anything in a normal client situation? No. And looks like nothing is needed. Do you have any problems on client when closing application? Firebird-Devel mailing list, web interface at https://lists.sourceforge.ne

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Scott Morgan via Firebird-devel
On 21/09/2020 14:10, Alex Peshkoff via Firebird-devel wrote: > as long as you are going ti quit application fb_shutdown() will be fine > Reading here: https://firebirdsql.org/rlsnotesh/rnfb25-apiods-api.html#rnfb25-apiods-api-shtdn > Currently operational only for the embedded engine and > In

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Dimitry Sibiryakov
21.09.2020 15:15, Scott Morgan via Firebird-devel wrote: On 21/09/2020 13:52, Dimitry Sibiryakov wrote:   fb_cancel_operation(fb_cancel_abort) in ordinary cases, I assume you just pass NULL as the DB connection. I'm sorry, I was wrong. -- WBR, SD. Firebird-Devel mailing list, web int

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Alex Peshkoff via Firebird-devel
On 2020-09-21 16:15, Scott Morgan via Firebird-devel wrote: On 21/09/2020 13:52, Dimitry Sibiryakov wrote: 21.09.2020 13:14, Scott Morgan via Firebird-devel wrote: So, to be safe, is there a way to cancel the isc_attach_database call?   fb_cancel_operation(fb_cancel_abort) in ordinary cases,

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Scott Morgan via Firebird-devel
On 21/09/2020 13:52, Dimitry Sibiryakov wrote: > 21.09.2020 13:14, Scott Morgan via Firebird-devel wrote: >> So, to be safe, is there a way to cancel the isc_attach_database call? > >   fb_cancel_operation(fb_cancel_abort) in ordinary cases, > I assume you just pass NULL as the DB connection. Th

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Alex Peshkoff via Firebird-devel
On 2020-09-21 15:52, Dimitry Sibiryakov wrote: 21.09.2020 13:14, Scott Morgan via Firebird-devel wrote: So, to be safe, is there a way to cancel the isc_attach_database call?   fb_cancel_operation(fb_cancel_abort) in ordinary cases, fb_shutdown() before application exit. fb_cancel_operati

Re: [Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Dimitry Sibiryakov
21.09.2020 13:14, Scott Morgan via Firebird-devel wrote: So, to be safe, is there a way to cancel the isc_attach_database call? fb_cancel_operation(fb_cancel_abort) in ordinary cases, fb_shutdown() before application exit. -- WBR, SD. Firebird-Devel mailing list, web interface at http

[Firebird-devel] Cancel isc_attach_database Before Timeout?

2020-09-21 Thread Scott Morgan via Firebird-devel
Doing some work on FlameRobin, looking at it's DB connection code. Basically, it sets up a worker thread to run the isc_attach_database call, the main GUI thread showing an interface while it waits. The problem is, a user can cancel the connection attempt, as they are fickle like that. What to do