posix
On Mac OS X, how do I turn a POSIX fd into a FILE*?
I\'m working with a lexer that accepts FILE* objects to read data from. I\'d like to be able to pass it POSIX 开发者_开发知识库file descriptors (i.e. stuff you get from open, pipes, etc.).[详细]
2023-03-15 18:27 分类:问答make main program wait for threads to finish
In the following code I create some number of threads, and each threads sleeps for some seconds. However my main program doesn\'t wait for the threads to finish, I was under the assumption that threa[详细]
2023-03-15 08:32 分类:问答User defined signal 1 terminates my POSIX program!
I have a program that runs some pthreads, and in every thread there is a connect(), recv() and send(). The problem is that sometimes it suddendly closes the entire program showing the message \"User d[详细]
2023-03-14 23:31 分类:问答strdup dumping core on passing NULL
strdup(null) dumps core. Tried in on ubuntu 开发者_如何学运维and freeBSD both. why? Shouldn\'t it return null?[详细]
2023-03-14 17:33 分类:问答Problem with perror() calls affecting semaphore locking/unlocking
I\'m trying to do some basic parallel processing to do an odd-even sort on integers using POSIX shared memory segments and unnamed semaphores. I have pretty much everything working at this point, exce[详细]
2023-03-14 11:00 分类:问答Pthreads and classes
I have made a Queue-class containing storage vectors and mutexes. To initialise the queue, a thread needs to be started. To make sure the thread is started correctly, the constructor waits for a signa[详细]
2023-03-14 10:24 分类:问答When is posix_memalign/memalign used? [duplicate]
This question already has answers here: Closed 11 years ago. Possible Dupl开发者_如何学运维icate:[详细]
2023-03-14 09:06 分类:问答Suspend JamVM and Restart It?
I am working on JamVM, a popular small Java VM, and I would like to stop it (suspend all the threads), execute a function within the VM (a C f开发者_开发知识库unction) and then restart all the threads[详细]
2023-03-14 05:00 分类:问答mutex concept in POSIX threads
could anyone tell me how to use the mutex in the posix threads. we are decalaring a mutex as pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER..[详细]
2023-03-13 20:44 分类:问答Python: "import posix" question
If I import os module, I can run the following to infer the location of os.py >>> import os >>> print os.__file__[详细]
2023-03-13 19:36 分类:问答