摘要: 在Linux环境下开发经常会碰到很多错误(设置errno),其中EAGAIN是其中比较常见的一个错误(比如用在非阻塞操作中)。 linux下使用write\send发送数据报 EAGAIN : Resource temporarily unavailable 错 首先是我把套接字设置为异步的了,然后 阅读全文
posted @ 2020-01-08 16:33 kissrule 阅读(473) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/nkwy2012/p/9171414.html 技巧小结: 字符串比较用双中括号[[ ]];算数比较用单中括号[ ]——左右留空格 算数运算用双小括号(( )) ;shell命令及输出用小括号( )——左右不留空格 快速替换用花括号{ }——左右留空格 阅读全文
posted @ 2020-01-08 16:27 kissrule 阅读(808) 评论(0) 推荐(0) 编辑
摘要: 什么是daemon进程? Unix/Linux中的daemon进程类似于Windows中的后台服务进程,一直在后台运行运行,例如http服务进程nginx,ssh服务进程sshd等。注意,其英文拼写为daemon而不是deamon。 为什么daemon进程需要特殊的编写步骤? daemon进程和普通 阅读全文
posted @ 2020-01-08 16:17 kissrule 阅读(832) 评论(0) 推荐(0) 编辑
摘要: ➜ nbd-master cat maketr #!/bin/sh # # Example script to make a transaction log file # Must be run as root. Remember to chown the file afterwards # Ins 阅读全文
posted @ 2020-01-08 15:05 kissrule 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 1 Install nbd-server sudo apt-get install nbd-server 2 Create a file content dd if=/dev/zero of=/mnt/dhini bs=1024 count=36000 Use mke2fs to make the 阅读全文
posted @ 2020-01-08 11:59 kissrule 阅读(1514) 评论(0) 推荐(0) 编辑