How to prevent memory leaks in pthread? I am running a server client program where server has to execute a pthread program and pss the result to clien ...
How to prevent memory leaks in pthread? I am running a server client program where server has to execute a pthread program and pss the result to clien ...
I recently read a book about how to write code in unix environment.There is an expample code making me very confused. The example code: How to fig ...
Today is my first day working with threads. I am struggling to understand why I am unable to pass the retval (type: void *) in both of the following w ...
In the CSAPP book Section 12.3, They said.. The thread terminates explicitly by calling the pthread_exit function. If the main thread calls pthrea ...
How are you? I am going to fix the segmentation fault in a worker thread on Ubuntu 18.04. My code is the following. The code works well. The output ...
I have been learning about pthread library, and have created a simple code to multiply two numbers, however I'm not able to get rid of this warning. P ...
I am trying to sum up 1000 elements integer array(where each element is 1) with pthread library by splitting the array in to segments of size 10. So e ...
I found this example; here the two threads threadDefault and threadCustomized are terminated by using pthread_exit followed by return. Why did the aut ...
I have a small problem, and I hope finding someone who can help. I am trying to develop a thread library in c using ucontext, and i have developped th ...
I'm trying to pass pointers to struct lower_hyper_id from a thread to the main thread, by the means of pthread_exit() function, that would compare and ...
I need to create a program which calculates recursion (for certain sequence). When I use int and decleare a recursion, that calculates values without ...
I am trying to use pthread in C to compare two strings. The idea is to see if the complete string 2 is in string 1 (For Example, if string1 = lkajdsgl ...
I am using posix threads in C. I have two threads in my program, thread1 and thread2. thread1 starts thread2. thread1 maintains a variable var1 base ...
This is my code for creating some threads. I want create 500 threads in the same time, not more. Easy, but my code failed after 32xxx threads created. ...
Running the following C code causes the program to hang, and does not respond to signals (including CTRL-C). Any idea why? The behaviour is normal ...
I have a worker thread doing a polling activity (it's targeting libcurl but that is not relevant). Many actions from the application can start a work ...
I have a server where I handle multiple clients. Each client that connects to it is serviced in its own thread. Now, if any errors occur on the server ...
I'm working on a multi-threading project and I need to make a copy of a thread's stack at some point in code (I need a pointer to that). because I'm g ...
Code: Why pthread_exit(NULL) here acts like pthread_join()? i.e Why exiting main not destroying the printHello thread and allowing it to continue? ...
i have opened a file in the thread and terminated the thread using pthread_exit() routine. Will it closes the opened files too? ...