上一页 1 ··· 6 7 8 9 10
摘要: 简易mysh示例:mysh.c #include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/wait.h>#include <glob.h>#include <string.h 阅读全文
posted @ 2022-07-13 21:12 *^VV^* 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1、进程标识符 PID pid_t //进程数据类型 ps //ps及相关命令 ps axf ps axm ps ax -L pid_t getpid(void); //获取当前进程PID pid_t getppid(void); //获取父进程PID 2、进程的产生 pid_t fork(void 阅读全文
posted @ 2022-07-11 20:46 *^VV^* 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 环境变量 export //输出所有环境变量 extern char **environ; char *getenv(const char *name); //获取某个环境变量 int setenv(const char *name, const char *value, int overwrite 阅读全文
posted @ 2022-07-10 21:18 *^VV^* 阅读(19) 评论(0) 推荐(0) 编辑
摘要: void Widget::QMutableList(void) //java格式的list { QList<int> list; //QT容器类 QMutableListIterator<int> i(list); //容器类读写迭代器 for(int j=0;j<10;j++) i.insert( 阅读全文
posted @ 2022-07-10 10:35 *^VV^* 阅读(66) 评论(0) 推荐(0) 编辑
摘要: #include <unistd.h> int getopt(int argc, char * const argv[],const char *optstring); //获取命令行参数 extern char *optarg; //参数选项(全局变量) extern int optind, op 阅读全文
posted @ 2022-07-09 21:51 *^VV^* 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 正常终止 1、从main函数返回 2、调用exit 3、调用_exit或_Exit //出现不可预料的错误时调用 4、最后一个线程从启动例程返回 5、最后一个线程调用pthread_exit 异常终止 1、调用abort 2、接到一个信号并终止 3、最后一个线程对其取消请求作出相应 atexit() 阅读全文
posted @ 2022-07-08 20:36 *^VV^* 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 系统时间获取 time_t time(time_t *tloc); //获取时间戳 struct tm *gmtime(const time_t *timep); //通过时间戳获取时间结构体 struct tm *gmtime_r(const time_t *timep, struct tm *r 阅读全文
posted @ 2022-07-07 21:19 *^VV^* 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1、修改 /etc/profile添加 export QTEDIR=/usr/local/Qt5.6 //设置QT目录 export LD_LIBRARY_PATH=/usr/local/Qt5.6/lib:$LD_LIBRARY_PATH //添加QT库路径 #export QT_QPA_GENE 阅读全文
posted @ 2022-07-07 15:47 *^VV^* 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 密码校验: 1、通过UID或name获取用户信息(/etc/passwd) struct passwd *getpwnam(const char *name); struct passwd *getpwuid(uid_t uid); 2、通过gid或grname获取用户组信息(/etc/group) 阅读全文
posted @ 2022-07-07 09:24 *^VV^* 阅读(28) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10