[fpc-pascal] How to handle SIGPIPE

2012-03-20 Thread Tobias Giesen
Hello, my app does http transfers using the Synapse library on Windows and Mac OS X. The transfers happen in separate threads. On Mac OS X only, the app is occasionally stopped due to a SIGPIPE. How can I avoid or handle a SIGPIPE? Cheers, Tobias ___

Re: [fpc-pascal] Re: How to handle SIGPIPE

2012-03-20 Thread michael . vancanneyt
On Tue, 20 Mar 2012, Tobias Giesen wrote: Hi, I think the biggest issue is that MSG_NOSIGNAL is not defined on MAC OS, even though it was added a few years (?) ago. When I ported Synapse, unfortunately I defined it as 0. Now I changed that to $2 and I'm hoping for the best ... I also

Re: [fpc-pascal] Re: How to handle SIGPIPE

2012-03-20 Thread Jonas Maebe
On 20 Mar 2012, at 08:41, Tobias Giesen wrote: I think the biggest issue is that MSG_NOSIGNAL is not defined on MAC OS, even though it was added a few years (?) ago. When I ported Synapse, unfortunately I defined it as 0. Now I changed that to $2 and I'm hoping for the best ... Hoping

Re: [fpc-pascal] Re: How to handle SIGPIPE

2012-03-20 Thread Tobias Giesen
Hoping is not enough when changing random values. See http://bugs.freepascal.org/view.php?id=9401 for more info. Wow. Many thanks! I read that MSG_NOSIGNAL is now supported by MacOS, too, but I don't really know. So now I am calling fpsetsockopt with SO_NOSIGPIPE as the first thing after

[fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
Hi, I was testing the new connector to MSSQL when I found a problem. If I compile and run in console, I have no memleak. Good. But if I put a breakpoint in AConnection.Free; and press F8, I got this: ERROR ,msg=Warning:\nCannot insert breakpoint -237.\nError accessing memory address 0x7816cd30:

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Martin
On 20/03/2012 12:08, Marcos Douglas wrote: Hi, I was testing the new connector to MSSQL when I found a problem. If I compile and run in console, I have no memleak. Good. But if I put a breakpoint in AConnection.Free; and press F8, I got this: ERROR ,msg=Warning:\nCannot insert breakpoint

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
On Tue, Mar 20, 2012 at 9:34 AM, Martin laza...@mfriebe.de wrote: On 20/03/2012 12:08, Marcos Douglas wrote: Hi, I was testing the new connector to MSSQL when I found a problem. If I compile and run in console, I have no memleak. Good. But if I put a breakpoint in AConnection.Free; and

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
Tem umas opções com o novo GDB 6.5 que parece ser a melhor opção. Vou recompilar o FPC e Lazarus utilizando: -gl -gw -godwarfsets Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
On Tue, Mar 20, 2012 at 11:36 AM, Martin laza...@mfriebe.de wrote: On 20/03/2012 14:08, Marcos Douglas wrote: On Tue, Mar 20, 2012 at 9:34 AM, Martinlaza...@mfriebe.de  wrote: On 20/03/2012 12:08, Marcos Douglas wrote: Hi, I was testing the new connector to MSSQL when I found a problem.

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Martin
On 20/03/2012 14:52, Marcos Douglas wrote: On Tue, Mar 20, 2012 at 11:36 AM, Martinlaza...@mfriebe.de wrote: On 20/03/2012 14:08, Marcos Douglas wrote: On Tue, Mar 20, 2012 at 9:34 AM, Martinlaza...@mfriebe.dewrote: On 20/03/2012 12:08, Marcos Douglas wrote: Hi, I was testing the new

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Jonas Maebe
On 20 Mar 2012, at 14:06, Marcos Douglas wrote: I compile FPC using these options: UPXPROG=echo COPYTREE=echo OPT=- gl You should use OPT=-O- -gl if you want to debug standard FPC units. The default for building the entire FPC source tree is -O2. Optimizations generally have little

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Martin
On 20/03/2012 14:52, Marcos Douglas wrote: ERROR ,msg=Warning:\nCannot insert breakpoint -237.\nError accessing memory address 0x7816cd30: Input/output error.\n I use gdb 7.3 (http://svn.freepascal.org/svn/lazarus/binaries/) only in 32 bit. I only use 32 bit. Interesting. 0x7816cd30 I

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
On Tue, Mar 20, 2012 at 12:24 PM, Martin laza...@mfriebe.de wrote: On 20/03/2012 14:52, Marcos Douglas wrote: On Tue, Mar 20, 2012 at 11:36 AM, Martinlaza...@mfriebe.de  wrote: On 20/03/2012 14:08, Marcos Douglas wrote: On Tue, Mar 20, 2012 at 9:34 AM, Martinlaza...@mfriebe.de    wrote:

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
On Tue, Mar 20, 2012 at 12:35 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 20 Mar 2012, at 14:06, Marcos Douglas wrote: I compile FPC using these options: UPXPROG=echo COPYTREE=echo OPT=-gl You should use OPT=-O- -gl if you want to debug standard FPC units. The default for building

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Marcos Douglas
On Tue, Mar 20, 2012 at 1:44 PM, Martin laza...@mfriebe.de wrote: On 20/03/2012 14:52, Marcos Douglas wrote: ERROR ,msg=Warning:\nCannot insert breakpoint -237.\nError accessing memory address 0x7816cd30: Input/output error.\n I use gdb 7.3 (http://svn.freepascal.org/svn/lazarus/binaries/)

Re: [fpc-pascal] SQLdb: problem using GDB, but do not have memleak

2012-03-20 Thread Martin
On 20/03/2012 12:08, Marcos Douglas wrote: Hi, I was testing the new connector to MSSQL when I found a problem. If I compile and run in console, I have no memleak. Good. But if I put a breakpoint in AConnection.Free; and press F8, I got this: ERROR ,msg=Warning:\nCannot insert breakpoint