List:Internals« Previous MessageNext Message »
From:Ingo Strüwing Date:October 1 2006 6:27pm
Subject:Re: MYSQL connection persistence through an execve() syscall
View as plain text  
Hi,

Am Dienstag, den 26.09.2006, 20:13 +0200 schrieb cuffiette:
> Hi everybody, 
> I migrate some C programs from a legacy isam to mysql. I can not change the program
> logic, because there are over than 300.000 lines of C code ! 
> So I'm rewriting only the legacy I/O isam calls (like open_isam, add_key, del_key,
> read_record, write_record, close_isam and so on..). 

What version of MySQL do you use? In which file(s) are these functions
defined? They don't look familiar to me.

...
> The socket remains opened through this call, but I think I must recreate 
> the MYSQL object after reading from shared memory (there is also the MYSQL statement
> data structure). Probabily, I need a function that clone a MYSQL connection ... 

execve(2) has the property to keep file descriptors, but fully
initialize the address space.

You may want to try fork(2) instead. It keeps both.

Regards,
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL AB, www.mysql.com

Thread
MYSQL connection persistence through an execve() syscallcuffiette26 Sep
  • Re: MYSQL connection persistence through an execve() syscallIngo Strüwing1 Oct
  • Re: MYSQL connection persistence through an execve() syscallKonstantin Osipov19 Jan