Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~409 People Reached
Favorite Forums
Favorite Tags
c x 6
Member Avatar for forestwwq

I wrote a few code to test fork like following: [code]#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <signal.h> #include <errno.h> #include <unistd.h> int DemoFork() { pid_t pid,par_pid; par_pid = getpid(); pid = fork(); switch (pid) { case -1: printf("failure!\n"); break; case 0: printf("I am child!, parent is %d(\n",par_pid); break; default: …

Member Avatar for forestwwq
0
74
Member Avatar for forestwwq

I write a small program like following: 1, firstly create a process waiting for keyboard input commands(via getchar()). 2, secondly create a thread in the process waiting on a message queue. each time after the thread receive a message, it can handle the message but cannot print the log message(via …

Member Avatar for frk
0
335