Chinaunix首页 | 论坛 | 博客
  • 博客访问: 988003
  • 博文数量: 96
  • 博客积分: 1553
  • 博客等级: 上尉
  • 技术积分: 1871
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-25 14:50
个人简介

专注点,细心点,耐心点 知行合一

文章分类

全部博文(96)

文章存档

2018年(1)

2014年(4)

2013年(31)

2012年(56)

2011年(4)

分类: C/C++

2012-02-08 19:37:11

#include 
#include 
#include 

#define MAXBUFSIZE 1024

int main ( int argc, char * argv[] )
{
    char buf[ MAXBUFSIZE ];
    int  count;

    count = readlink( "/proc/self/exe", buf, MAXBUFSIZE );
    if ( count < 0 || count >= MAXBUFSIZE )
    {
        printf( "Failed\n" );
       return( EXIT_FAILURE );
    }
    buf[ count ] = '\0';
    printf( "/proc/self/exe -> [%s]\n", buf );
    return( EXIT_SUCCESS );
}  
阅读(1394) | 评论(0) | 转发(1) |
0

上一篇:md5加密

下一篇:使用zlib进行压缩,解压缩

给主人留下些什么吧!~~