I'm trying to wake up a select(...); using a pipe fd. This should be rather straightforward, but I cannot get it to work. Perhaps you guys could give me a few tips.
My wakeup function looks like this:
This pipe is created using:
And the net_rd_set is the set select uses:
Of course the maxfd is set to:
It should be noted net_trig_wr(); is called from another thread (created using POSIX-threads) than the select(...) operates in.
I've attached the entire net.c file (as net.txt) in this document. So if you want to have a look at it to help me further. Feel free to get inspired by my code also (if there is anything to get inspired by).
Any tips would be usefull!
/ Henrik, Sweden
(For the intressted, im actually rewriting a Java-server I've done for www.betapet.com which is a free swedish scrabble-site)
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
I'm currently studying IPC, I have a first program
A: Do an exec for B and wait
B: Receive through a fifo a string from a third program "C" and have to resend it to A
I was thinking to open a pipe in A before the exec, then passing fd to B as an argument
if(pipe(fd)==-1){
... (1 Reply)
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
Is select only supposed to report state changes on an FD's, state, whether or not it had pending input available in the first place? I've got a situation where select() repeatedly reports no FD's ready for stdin when there's lots of data available. And if it only reports changes, how is this... (2 Replies)
OK... I'm fairly new to unix having the admin handed to me on a platter w/almost no training.
However, being a programmer, I do pick up things fairly easily, but this one is getting the best of me.
I have a unix server that runs multiple versions of the same ERP system, hand crafted for our... (1 Reply)
Hi. I just found this site while searching for some info on a problem and thought I'd see if anyone else knows the answer.
I have two threads that are connected by a pipe. Thread A can write to the pipe and Thread B can read the data from the pipe. My problem is that when I use select() in... (3 Replies)
Hello
I would like to perform a select from a oracle table and return those values to my shell script
For example:
site=head -1 $infile | cut -c1-15 | awk '{printf "s%", $0}
sqlplus -s /nolog |& #Open pipe to sql
select col1, col2, col3, col4
from oracle_table
where col5 =... (6 Replies)
on my desktop i am using the kde rotating desktop image option. this rotates images randomly every half hour. now, i would like to write an html file which will have an inline frame with some text, maybe system messages, or my friends live journal thati read alot, or unix.com! however, i dont want... (1 Reply)
I'm trying to compile and install both most recent version of 'make' and the
most recent version of 'openssh' on my Sparc20.
I've run into the following problems... and I don't know what they mean. Can
someone please help me resolve these issues?
I'm using the 'make' version that was... (5 Replies)