thread specific stdin,file descriptors
can anyone pl tell me how to set different file descriptors values for stdin,stdout,stderr (a value other than 0,1,2) ,for a specific specific thread using its thread id.
pl help :-( thanx |
Well I am not sure if that it what you want but you could try duplicating those file descriptors and pass it to the threads you would need .. Take a look at man 2 dup2
|
can u pl tell me hoe do i pass the fd to a thread
|
The file descriptor fd is a int so you could pass it to te function called by the thread doing simple type casting.
Taking a look at the manpage should make things clearer for you http://www.die.net/doc/linux/man/man..._create.3.html |
All times are GMT -5. The time now is 06:21 PM. |