当前位置: 技术问答>linux和unix
C语言:短信程序,我该怎么优化它,才能让它不会每隔几小时就崩溃
来源: 互联网 发布时间:2016-07-17
本文导语: #include #include #include #include #include #include "/usr/local/mysql/include/mysql/mysql.h" #define MAXFILE 65535 int main(int argc, char** argv) { MYSQL *my_conn; MYSQL_RES *res; MYSQL *my_connn; MYSQL_RES *ress; MYSQL_ROW row; MYSQL_ROW roww; ...
#include
#include
#include
#include
#include
#include "/usr/local/mysql/include/mysql/mysql.h"
#define MAXFILE 65535
int main(int argc, char** argv)
{
MYSQL *my_conn;
MYSQL_RES *res;
MYSQL *my_connn;
MYSQL_RES *ress;
MYSQL_ROW row;
MYSQL_ROW roww;
int len;
my_conn=mysql_init(NULL);
my_connn=mysql_init(NULL);
pid_t pc;//从这开始是守护进程
int i,fd,lena;
char *buf="this is a Dameonn";
lena=strlen(buf);
pc=fork();
if(pc0)
exit(0);
setsid();
chdir("/");
umask(0);
for(i=0;i
#include
#include
#include
#include
#include "/usr/local/mysql/include/mysql/mysql.h"
#define MAXFILE 65535
int main(int argc, char** argv)
{
MYSQL *my_conn;
MYSQL_RES *res;
MYSQL *my_connn;
MYSQL_RES *ress;
MYSQL_ROW row;
MYSQL_ROW roww;
int len;
my_conn=mysql_init(NULL);
my_connn=mysql_init(NULL);
pid_t pc;//从这开始是守护进程
int i,fd,lena;
char *buf="this is a Dameonn";
lena=strlen(buf);
pc=fork();
if(pc0)
exit(0);
setsid();
chdir("/");
umask(0);
for(i=0;i