Computers/Linux System Programming

ch7. process environment

emzei 2013. 4. 28. 10:14

◆ exit

 

#include<stdlib.h>

 void exit(int status);

 

 

◆ _Exit

 

#include<stdlib.h>

 void _Exit(int status);


 

◆ _exit

 

#include<unistd.h>

 void _exit(int status);


 

◆ atexit

#include<stdlib.h>

 int atexit(void (*func) (void));

 

 


 

 

 

 

◆ malloc

#include<stdlib.h>

 void* malloc(size_t size);

(ret)  success : NULL이 아닌 포인터

   failed : NULL


◆ calloc

#include<stdlib.h>

 void* calloc(size_t nobj, size_t size);

(ret)  success : NULL이 아닌 포인터

   failed : NULL


◆ realloc

#include<stdlib.h>

 void *realloc(void *ptr, size_t newsize);

(ret)  success : NULL이 아닌 포인터

   failed : NULL


◆ free

#include<stdlib.h>

 void free(void *ptr);

 

 

◆ getenv

#include<stdlib.h>

 char* getenv(const char *name);

(ret)  success : name으로 주어진 이름에 해당하는 환경 변수값을 가리키는 포인터

   failed : 이름이 없는 경우 NULL


◆ putenv

#include<stdlib.h>

 int putenv(char *str);

(ret)  success : 0

   failed : 0이 아닌 값


◆ setenv

#include<stdlib.h>

 int setenv(const char *name, const char *value, int rewrite);

(ret)  success : 0

   failed : -1


◆ unsetenv

#include<stdlib.h>

 int unsetenv(const char *name);

(ret)  success : 0

   failed : -1



◆ setjmp

#include<setjmp.h>

 int setjmp(jmp_buf env);

(ret)  직접 호출돈 경우에는 0, longjmp를 통해서 호출된 경우에는 0이 아닌 값


◆ longjmp

#include<setjmp.h>

 void longjmp(jmp_buf env, int val);

 

 


 

 

 

 

◆ getrlimit

#include<setjmp.h>

 int getrlimit(int resource, struct rlimit *rlptr);

(ret)  success : 0

   failed : 0이 아닌 값


◆ setrlimit

#include<setjmp.h>

 int setrlimit(int resource, const struct rlimit *rlptr);

(ret)  success : 0

   failed : 0이 아닌 값



'Computers > Linux System Programming' 카테고리의 다른 글

ch9. process relationship  (0) 2013.05.20
ch8. process control  (0) 2013.04.28
ch6. system data file and system information  (0) 2013.04.28
ch5. standard I/O library  (0) 2013.04.28
ch4. file & directory  (0) 2013.04.27