linux c oci 远程连接例子
以下是我的测试oci的例子!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "oci.h"
static OCIServer *srvhp;
static OCISession *p_session;
static OCIEnv *p_env;
static OCIError *p_err;
static OCISvcCtx *p_svc;
static OCIStmt *p_sql;
static OCIDefine *p_dfn = (OCIDefine *) 0;
static OCIBind *p_bnd = (OCIBind *) 0;
int main()
{
int p_bvi;
text p_sli[10];
int rc;
char errbuf[100];
int errcode;
rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */
(dvoid * (*)(dvoid *, size_t)) 0,
(dvoid * (*)(dvoid *, dvoid *, size_t))0,
(void (*)(dvoid *, dvoid *)) 0 );
/* Initialize evironment */
rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );
/* Initialize handles */
rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
&
相关文档:
Linux中wait用法:
系统中的僵尸进程都要由wait系统调用来回收。
函数原型:
#include<sys/types.h>
#include<sys/wait.h>
pid_t wait(int *status);
进程一旦调用了wait就立即阻塞自己,由wait自动分析是否当前进程的某个子进程已经退出,如果让它找到了这样一个已经变成僵尸的子进程,wait就会收集这 ......
Linux内核是作为Monolithic architecture (单内核体系结构) 而实现的,为了获得 Microkernel architecture (微内核体系结构) 带来的可扩展性和可维护性,Linux 引入了模块 (module) 机制,(比较准确的说法是 Loadable Kernel Module, 可装载内核模块),藉此来保证内核的紧凑性和Linux本身固有的单一体系结构的优点— ......
linux下默认只能解压zip压缩文件,而rar文件默认没有解压支持的工具,这里提供一个简单的方式,安装rar工具,支持linux下解压rar文件。
1:首先下载rar解压工具,这里用 rarlinux-3.6.b6.tar.gz,给出一个网友提供的版本下载地址:
http://blogimg.chinaunix.net/blog/upfile2/080226173046.gz
2:接下来执行如下操作
t ......
Here is small script that does this. Debian or Ubuntu GNU/Linux does
not comes with any SYS V init script (located in /etc/init.d directory)
.
You create a script as follows and use it to stop or flush the iptables rules.
Please don't type rules at command prompt. Use the script to sp ......