主要是为了以后能举一反三Apache配置方案首先,安装apache的一个第三方模块“mod_rpaf”, 官方网站: http://stderr.net/apache/rpaf/wget http://www.stderr.net/apache/rpaf/download/mod_rpaf-0.6....
分类:
系统相关 时间:
2014-07-23 12:39:26
阅读次数:
229
assert宏的原型定义在中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include void assert( int expression ); assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调....
分类:
其他好文 时间:
2014-07-22 22:34:52
阅读次数:
187
/*
?XCode?LLVM?XXX?-?Preprocessing中Debug会添加?DEBUG=1?标志
?*/
#ifdef?DEBUG
#define?NSLog(FORMAT,?...)?fprintf(stderr,"%s:%d\t%s\n",[[[NSString?stringWithUTF8String:__FILE__]?lastP...
分类:
移动开发 时间:
2014-07-21 10:34:03
阅读次数:
244
ferror
ferror()用来检查参数stream所指定的文件流是否发生了错误情况
未出错,返回0;出错,返回非零值
perror
将上一个函数发生错误的原因输出到标准错误(stderr). 参数s所指的字符串先打印, 后面加上错误的原因字符串. 此错误原因依照全局变量errno来决定
...
分类:
其他好文 时间:
2014-07-19 13:48:19
阅读次数:
189
assert宏的原型定义在中,其作用是如果它的条件返回错误,则终止程序执行#include void assert( int expression ); assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abo.....
分类:
系统相关 时间:
2014-07-16 18:50:53
阅读次数:
316
标准输入:STDIN,描述符:0,默认为键盘。标准输出:STDOUT,描述符:1,默认为显示器。标准错误输出:STDERR,描述符:2,默认为显示器。输入重定向:<
输出重定向:>
错误输出重定向:2>
错误的像正确的一样输出:2>&1
错误的和正确的输出到同一个文件:&am..
分类:
其他好文 时间:
2014-07-04 06:52:55
阅读次数:
336
在进程一开始运行,就自动打开了三个对应设备的文件,它们是标准输入、输出、错误流,分别用全局文件指针stdin、stdout、stderr表示,对应的文件描述符为0,1,2;stdin具有可读属性,缺省情况下是指从键盘的读取输入,stdout和stderr具有可写属性,缺省情况下是指向屏幕输出数据。
将文件路径转化为文件指针:
#include //头文件包含
FILE *fopen(...
分类:
编程语言 时间:
2014-06-30 10:44:03
阅读次数:
176
#include
#include
#include
#include
#include
int main( void )
{
int signo;
pid_t pid;
if( (pid=fork())
{
fprintf(stderr, "main 1 fork err!\n");
ret...
分类:
其他好文 时间:
2014-06-26 11:45:48
阅读次数:
212
if( (so_pid=fork())
#include
#include
#include
#include
#include
static pid_t so_pid;
static void chld_wait( int signo )
{
waitpid( so_pid, NULL, 0 );
fprintf(stderr, "父进程[%d]已成...
分类:
其他好文 时间:
2014-06-26 07:15:33
阅读次数:
179
#include
#include
#include
#include
#include
int main( void )
{
daemon_init();
fprintf(stderr, "main进程[%d]\n", getpid() );
while( 1 )
{
}
exit(0);
}
i...
分类:
其他好文 时间:
2014-06-25 07:07:43
阅读次数:
204