Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux³ÌÐò´ò²»¿ªÍ·Îļþ

#include <fcnt1.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc,char *argv[])
{
  int fd_open,fd_open_create,fd_create;
  if((fd_open=open("/home/wang/test/hello.c",O_RDONLY))==-1)
    {
      perror("open");
      exit(EXIT_FAILURE);
    }
  printf("the file's descriptor is:%d\n",fd_open);

  if((fd_open_create==open("./tmp1",O_CREAT|O_EXCL,0644))==-1)
    {
      perrno("open");
      exit(EXIT_FAILURE);
    }
  printf("the tmp1 file descriptor is:%d\n",fd_open_create);

  if((fd_create=creat("./tem2",0644))==-1)
    {
      perrno("create");
      exit(EXIT_FAILURE);
    }
  printf("the tmp2 file descriptor is:%d\n",fd_create);

  close(fd_open);
  close(fd_create);
  close(fd_open_create);

  return 0;
}
±àÒë½á¹û
wangjun@my-desktop:~/test$ gcc -ggdb3 -o open_example open_example.c
open_example.c:1:19: ´íÎó£º fcnt1.h£ºÃ»ÓиÃÎļþ»òĿ¼
open_example.c: ÔÚº¯Êý¡®main¡¯ÖÐ:
open_example.c:8:


Ïà¹ØÎÊ´ð£º

ÇóÖú£¬LINUXµÄI2C

ΪʲôÎÒ ioctl(fd,I2C_SLAVE,0x50) ÕýÈ·£¬¶ø½«0x50¸Ä³ÉÆäËûµØÖ·¶¼³ö´í£¿
ÊDz»ÊÇÿÔö¼ÓÒ»¸öI2CÆ÷¼þ£¬ÒªÐÞ¸ÄÄں˴úÂ룿

¡£¡£¡£×Ô¼º½â¾öÁË¡£¡£²»Í¬I2CµØÖ·£¬ÒªÖØÐÂopen¡£¡£
²»¹ýҲлл¥Éϵģ¬ËÍ·ÖÁË
......

ÐéÄâ»ú°²×°ºìÆìLINUXÎÊÌâ

¸ç¸ç½ã½ãÃÇ£¬£¬£¬ÎÒÔÚVISTA ÏÂÓÃVMware °²×°ºìÆì6.5ʱ£¬°²×°µ½Ó²ÅÌ·ÖÇøµÄʱºò£¬×ÜÊdzöÏÖÒ»¸ö¶Ô»°¿ò¡£ÉÏÃæÐ´×Å£º¡°³öÏÖ´íÎó---δÕÒµ½ÒªÔÚÆäÖд´½¨ÐÂÎļþϵͳµÄÓÐЧÉ豸¡£Çë¼ì²éÄãµÄÓ²¼þÒÔÕÒµ½ÎÊÌâµÄÆðÒò¡£¡±ÇëÎÊÔõô½ ......

Web¹¤³Ì·Åµ½linux·þÎñÆ÷ÉϳöÏÖ´íÎó

³öÏÖÕâ¸ö´íÎó¡£²»ÖªµÀÊÇÎÒ´úÂëµÄÎÊÌ⻹ÊÇ·þÎñÆ÷µÄÎÊÌâ¡£
javax.servlet.ServletException: unable to create new native thread
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageConte ......

¡¾É¨Ã¤¡¿ LinuxºÍUNIXµÄÇø±ðºÍÁªÏµ

LinuxºÍUNIXµÄÇø±ðºÍÁªÏµ


LinuxºÍUNIXµÄ×î´óµÄÇø±ðÊÇ£¬Ç°ÕßÊÇ¿ª·¢Ô´´úÂëµÄ×ÔÓÉÈí¼þ£¬¶øºóÕßÊǶÔÔ´´úÂëʵÐÐ֪ʶ²úȨ±£»¤µÄ´«Í³ÉÌÒµÈí¼þ¡£ÕâÓ¦¸ÃÊÇËûÃÇ×î´óµÄ²»Í¬£¬ÕâÖÖ²»Í¬ÌåÏÖÔÚÓû§¶ÔǰÕßÓкܸߵÄ×ÔÖ÷ ......

Linux°²×°ÎÊÌâ ¹ØÓÚ´ÅÅÌʶ±ð

¾ÍÊÇ˵ÏÖÔÚÊÇwindowsÏ ÎÒ°ÑÒ»¸ö·ÖÇøÌÚ³öÀ´ÁË  µ«ÊÇÓùâÅ̰²×°linuxµÄʱºòʶ±ð²»ÁË  ÄǸÃÔõÑù°Ñ´ÅÅ̵ĸñʽת»»ÎªlinuxÄÜʶ±ð³öµÄ?

ÓÐÈËÕâÑù»Ø´ð

(
°Ñ·ÖÇøÉ¾³ý£¬È»ºóÓÃLinux°²×°Å̸ñʽ»¯³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ