Subject | new udf library |
---|---|
Author | German Aracil Boned |
Post date | 2004-11-30T12:31:42Z |
Hello
I write a new udf for firebird. Now that have one function:
fbthread.h
------------------
int create_thread PROTO_LIST ((char *, char *, char *, char *, char *));
fbthread.c
------------------
#include <unistd.h>
#include "global.h"
#include "fbthread.h"
int create_thread (program, database, user, pass, sql)
{
int pidproc;
char *progarg[] = {database, '-u', user, '-p', pass, sql};
pidproc = fork();
if(pidproc == 0)
{
execv(program, progarg);
}
return 0;
}
I compilethis code and create fbthread library. coping it to
/opt/firebird/lib directory.
This is my declaration for db:
declare external function F_CREATE_THREAD
cstring(256),
cstring(256),
cstring(256),
cstring(256),
sctring(256)
returns integer free_it
entry_point 'create_thread' module_name 'fbthread'
The library name is fbthread ! .. But returns error when I put this in
procedures:
340
Unsuccessful execution caused by a system error that procludes
successful execution of subsequent statements.
Access to UDF library "libfbthread.so" is denided by server administrator.
libfbthread.so Isn't my library name fbthread. I create link with this
new name to fbthread, but don't work ..
Please .. help ;)
Regards
--
-----------------------------
Aracil Informática
German Aracil Boned
E-mail: german@...
Tel : 96 129 43 44
http://www.tecnoxarxa.com
http://www.notasenred.com
-----------------------------
Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos EXCLUSIVAMENTE a los destinatarios especificados. La información contenida puede ser CONFIDENCIAL y/o estar LEGALMENTE PROTEGIDA y no necesariamente refleja la opinión de Aracil Informática SL. Si usted recibe este mensaje por ERROR, por favor comuníqueselo inmediatamente al remitente y ELIMINELO ya que usted NO ESTA AUTORIZADO al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida.
Gracias.
-----------------------------
This e-mail message and any attached files are intended SOLELY for the addressee/s identified herein. It may contain CONFIDENTIAL and/or LEGALLY PRIVILEGED information and may not necessarily represent the opinion of Aracil Informática SL. If you receive this message in ERROR, please immediately notify the sender and DELETE it since you ARE NOT AUTHORIZED to use, disclose, distribute, print or copy all or part of the contained information.
Thank you.
-----------------------------
I write a new udf for firebird. Now that have one function:
fbthread.h
------------------
int create_thread PROTO_LIST ((char *, char *, char *, char *, char *));
fbthread.c
------------------
#include <unistd.h>
#include "global.h"
#include "fbthread.h"
int create_thread (program, database, user, pass, sql)
{
int pidproc;
char *progarg[] = {database, '-u', user, '-p', pass, sql};
pidproc = fork();
if(pidproc == 0)
{
execv(program, progarg);
}
return 0;
}
I compilethis code and create fbthread library. coping it to
/opt/firebird/lib directory.
This is my declaration for db:
declare external function F_CREATE_THREAD
cstring(256),
cstring(256),
cstring(256),
cstring(256),
sctring(256)
returns integer free_it
entry_point 'create_thread' module_name 'fbthread'
The library name is fbthread ! .. But returns error when I put this in
procedures:
340
Unsuccessful execution caused by a system error that procludes
successful execution of subsequent statements.
Access to UDF library "libfbthread.so" is denided by server administrator.
libfbthread.so Isn't my library name fbthread. I create link with this
new name to fbthread, but don't work ..
Please .. help ;)
Regards
--
-----------------------------
Aracil Informática
German Aracil Boned
E-mail: german@...
Tel : 96 129 43 44
http://www.tecnoxarxa.com
http://www.notasenred.com
-----------------------------
Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos EXCLUSIVAMENTE a los destinatarios especificados. La información contenida puede ser CONFIDENCIAL y/o estar LEGALMENTE PROTEGIDA y no necesariamente refleja la opinión de Aracil Informática SL. Si usted recibe este mensaje por ERROR, por favor comuníqueselo inmediatamente al remitente y ELIMINELO ya que usted NO ESTA AUTORIZADO al uso, revelación, distribución, impresión o copia de toda o alguna parte de la información contenida.
Gracias.
-----------------------------
This e-mail message and any attached files are intended SOLELY for the addressee/s identified herein. It may contain CONFIDENTIAL and/or LEGALLY PRIVILEGED information and may not necessarily represent the opinion of Aracil Informática SL. If you receive this message in ERROR, please immediately notify the sender and DELETE it since you ARE NOT AUTHORIZED to use, disclose, distribute, print or copy all or part of the contained information.
Thank you.
-----------------------------