grb2015 / linux_c Goto Github PK
View Code? Open in Web Editor NEWUnderstanding UNIX/LINUX Programming--A Guide to Theory and Practice <<Unix-Linux编程实践教程>> 该项目是对本书的学习。
Understanding UNIX/LINUX Programming--A Guide to Theory and Practice <<Unix-Linux编程实践教程>> 该项目是对本书的学习。
[root@grb_host 13_UDP_license]# hostname
grb_host
[root@grb_host 13_UDP_license]# ./dgsend grb_host 12345 aaa
make addr: Resource temporarily unavailable
[root@grb_host 13_UDP_license]#
bug: make addr: Resource temporarily unavailable
bug: you must set_mode(0)first before you reset set_mode(1)
when execute ./pwd print:
error looking for inum 1
运行错误:执行不正确,error looking for inum 1
[root@ 11_coroutine_and_socket]# ./2
Segmentation fault (core dumped)
[root@ 11_coroutine_and_socket]#
^\Quit (core dumped)
'ls' current ouput are:
drwxrwxrwx 1 root root 0 Apr 1 14:36 .
drwxrwxrwx 1 root root 0 Mar 31 11:10 ..
-rwxrwxrwx 1 root root 9860 Apr 1 14:36 ls
-rwxrwxrwx 1 root root 5279 Apr 1 14:36 ls.c
[root@localhost shell3]# ./sh1
ls -l
total 37
-rwxrwxrwx. 1 root root 792 Apr 27 22:12 execute.c
-rwxrwxrwx. 1 root root 10173 Apr 27 22:47 sh1
-rwxrwxrwx. 1 root root 10173 Apr 27 22:51 sh3
-rwxrwxrwx. 1 root root 1082 Apr 27 22:36 smsh1.c
-rwxrwxrwx. 1 root root 327 Apr 27 22:43 smsh.h
-rwxrwxrwx. 1 root root 3717 Apr 27 22:46 splitline.c
drwxrwxrwx. 1 root root 0 Apr 25 20:32 sriptdemo
Segmentation fault (core dumped)
[root@localhost shell3]#
issue1: [ 8_thread]1_create.c bug: 并没有打印出print_id,线程1没有被启动啊 #2
|* gcc 1_create.c -o 1 -lpthread
[root@grb_host 8_thread]# ./1
~ |* main thead id = 2078766848
~ |* [root@grb_host 8_thread]#
~ |*
~ |* bug: 并没有打印出print_id,线程1没有被启动啊
issue2:[10_IPC/4_NamedPipe server.c client.c] open(FIFO_WRITE,O_WRONLY)有问题 #3
通过gdb调试,发现
server.c 程序在wfd = open(FIFO_WRITE,O_WRONLY);会阻塞不动了。
client.c 程序在 if( (wfd = open(FIFO_WRITE,O_WRONLY)) == -1)会阻塞不动了。
issue3:[7_process] 1_fork.c 父进程先于子进程结束后,为什么子进程无法退出shell #1
bug :如果注释掉sleep(1),为什么子进程无法退出?(在我的计算机上调度是父进程先退出)
[root@grb_host 7_process]# ./1
I am parent process,mychild pid = 3368,mypid = 3367,myppid =3314
exit
[root@grb_host 7_process]# I am child process,mypid = 3368,myppid =1
exit
暂时不能支持第二个参数,指定目录
server got Segmentation fault (core dumped) when client was connecting.
when the program rum to ctime , error occures.
程序编译后,当运行到printf( "%.12s ", 4+ctime(&info_p->st_mtime));后,发生错误。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.