ftell 函数, 运用实例:ftell(fp) >= size
long ftell(FILE *stream);
The ftell() function obtains the current value of the file position
indicator for the stream pointed to by stream.
unlink 函数: 应用实例:unlink(bakfile)
unlink - call the unlink function to remove the specified file
unlink FILE
unlink OPTION --------这里是断开备份文件strstr 函数: 应用实例: if(strstr(argv[i],"nofork"
返回子串首次出现的地址,第二个参数为子串,
#include <string.h>
char *strstr(const char *haystack, const char *needle);
The strstr() function finds the first occurrence of the substring nee-
dle in the string haystack. The terminating '\0' characters are not compared.
setpgid 函数 setpgid( 0 , 0 ) == -1
设置父进程的实际组id
#include <unistd.h>
int setpgid(pid_t pid, pid_t pgid);
setpgid() sets the PGID of the process specified by pid to pgid. Ifpid is zero, then the process ID of the calling process is used. If pgid is zero,
then the PGID of the process specified by pid is made the same as its process ID. If setpgid() is used to move a process from
one process group to another (as is done by some shells when creating pipelines), both process groups must be part of the same session (see
setsid(2) and credentials(7)). In this case, the pgid specifies an existing process group to be joined and the session ID of that group must match the session ID of the joining process.
syscall 函数,应用实例:pid_t m_tid_thread = syscall(__NR_gettid);
syscall() 执行一个系统调用,根据指定的参数number和所有系统调用的汇编语言接口来确定调用哪个系统调用。
系统调用所使用的符号常量可以在头文件里面找到。