Skip to content

linux_c-practice's issue #11

@grb2015

Description

@grb2015

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions