signal(SIGPIPE,pipe_sig_handler), EINTR problem/fix?

signal(SIGPIPE,pipe_sig_handler), EINTR problem/fix?

am 21.06.2003 04:02:47 von Chris Nasho

Hi,

I'm using
mysql-3.23.55

built with gcc 2.95.3
CFLAGS="-O3" CXX=gcc \
CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
../configure \
--enable-thread-safe-client \
--prefix=/mpathix/mysql-3.23.55 \
--localstatedir=/mpathix/mysql-3.23.55/data \
--without-bench \
--with-innodb

and
MyOdbc-2.50.39
unixODBC-2.2.4

Solaris 8
SunOS xxxxx 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80


Basically we have an open-source CORBA library (ACE+TAO) that blocks the
SIGPIPE signal. But mysql with myodbc will install a new signal handler
for SIGPIPE and then our corba orb thread will exit one of it's system
calls with errno EINTR because of a SIGPIPE.

I checked out the source for mysql

line 1047 libmysql.c

#if defined(SIGPIPE) && defined(THREAD) && !defined(__WIN__)
if (!((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE))
(void) signal(SIGPIPE,pipe_sig_handler);
#endif


shouldn't it be !defined(THREAD)
?

Thanks,
Chris




--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: signal(SIGPIPE,pipe_sig_handler), EINTR problem/fix?

am 21.06.2003 13:47:05 von Sinisa Milivojevic

Chris Nasho writes:
> Hi,
>
> I'm using
> mysql-3.23.55
>
> built with gcc 2.95.3
> CFLAGS="-O3" CXX=gcc \
> CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
> ./configure \
> --enable-thread-safe-client \
> --prefix=/mpathix/mysql-3.23.55 \
> --localstatedir=/mpathix/mysql-3.23.55/data \
> --without-bench \
> --with-innodb
>
> and
> MyOdbc-2.50.39
> unixODBC-2.2.4
>
> Solaris 8
> SunOS xxxxx 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80
>
>
> Basically we have an open-source CORBA library (ACE+TAO) that blocks the
> SIGPIPE signal. But mysql with myodbc will install a new signal handler
> for SIGPIPE and then our corba orb thread will exit one of it's system
> calls with errno EINTR because of a SIGPIPE.
>
> I checked out the source for mysql
>
> line 1047 libmysql.c
>
> #if defined(SIGPIPE) && defined(THREAD) && !defined(__WIN__)
> if (!((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE))
> (void) signal(SIGPIPE,pipe_sig_handler);
> #endif
>
>
> shouldn't it be !defined(THREAD)
> ?
>
> Thanks,
> Chris
>

Yes,

this is fixed in later releases, like this:

#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD)


--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org