What is the most elegant and simple way to implement a circular list, FIFO style? I'm looking for a solution that doesn't resort to hacks like catching exceptions.
No, this is not for homework.
For a little background, I want to use a circular list within GWT; so using a 3rd party lib is not what I want.
Edit: In order to clarify, I r...
I'm looking to stream lots of data (up to ~1 Gbit) from Java to a C++ application (both on the same machine). I'm currently using a FIFO on Linux but need a Windows solution too.
The most cross-platform method seems to be a local socket, but:
a) won't I get huge overhead from TCP checksumming and copying to & from kernel space, and
b) w...
I'm currently trying to create a kernel module that will produce data based on kernel events and push them to a file. After reading that this is bad (and I agree), I decided it would make more sense to have the data in a /proc file that a user program could pull from when necessary. However, this idea led to all sorts of problems, part...
I open a FIFO file as ifstream. As soon as the object is created the thread is blocked until I send something into the FIFO (which is OK for me). I then call getline() to get the data from stream.
How do I read-block the thread again until more data is written into FIFO file?
Thanks
...
If I have a program which creates and attempts to open a named pipe using mkfifo, how can I open a pipe for reading or writing without blocking?
Specifically, I'm writing a C program which can be run with or without a gui (written in Java).
In the C program, I successfully create the named pipes using mkfifo, however when I do
FILE* i...
I am writing a program for POSIX (OSX) where I will have many processes sending messages to one listener, who is essentially a logging thread. All of the processes are running in seperate programs, and using a single named pipe (FIFO) that many processes write to, but only a single process reads from is very tempting.
Questions:
1) ...
A web service is configured to expose some of its data when receiving a USR1 signal. The signal will be sent by a xinetd server when it receives a request from a remote client, e.g. nc myserver 50666. When the web server receives USR1 signal, it opens a dedicated fifo pipe, writes its data to the pipe, and then close the pipe. In the mea...
I'm getting annoyed with GUI problems in my threads. How do i create a FIFO so my main form/thread will receive data to do things instead of having my threads use a callback and run the code (and fail) themselves?
The gui problem in question -> http://stackoverflow.com/questions/729359/thread-exception-on-selectednode-nodes0/729377
...
What is the correct name for the following data structure? It is:
A queue of fixed size
New elements are added to the start
Whenever the queue gets above a certain size a number of elements are removed from the end
...
I created a new FIFO using the 'mkfifo' command. I have a text file f.txt.
I want to write the text file into my FIFO. How? Is there a unix command for that?
...
I'm trying to write to FIFO file locate on NFS mount and it blocks. What could be the problem?
My /etc/export:
/tmp/test/ 10.0.0.0/24(rw,no_root_squash,async)
ls /tmp/test on NFS server and client is the same
prw--w--w- 1 root root 0 2009-06-24 17:28 ui-input
and I'm writing as root
Thanks.
...
Hi!
I'm running a few Team Fortress 2 servers and I want to write a little management script.
Basically the TF2 servers are a fg process which provides a server console, so I can start the server, type status and get an answer from it:
***@purple:~/tf2$ ./start_server_testing
Auto detecting CPU
Using AMD Optimised binary.
Server will ...
Which STL container would fit my needs best? I basically have a 10 elements wide container in which I continually push_back new elements while pop_front ing the oldest element (about a million time).
I am currently using a std::deque for the task but was wondering if a std::list would be more efficient since I wouldn't need to realloca...
How can you create a temporary FIFO (named pipe) in Python? This should work:
import tempfile
temp_file_name = mktemp()
os.mkfifo(temp_file_name)
open(temp_file_name, os.O_WRONLY)
# ... some process, somewhere, will read it ...
However, I'm hesitant because of the big warning in Python Docs 11.6 and potential removal because it's ...
I'm running LaTeX on a named pipe fifo on Unix. I create the fifo like-so:
$ mkfifo fifo
I then run LaTeX like-so:
$ latex fifo
This process blocks and has no output until I write to the fifo from another shell:
$ echo "\\end" > fifo
Then the $ latex fifo output becomes:
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
%...
I'm busting my head but cannot find a solution for this. Please consider this scenario:
I have writers that want to write to non-blocking "queue" to another machine on the local network and have a reader that will read data (blocking mode if there are no writers) and do some job A and then return after a long hour and take next data.
...
We're using named pipes with Sybase bcp so that we can compress output on-the-fly.
This is a paraphrase of the error handling idiom, some error checking in the non-bcp parts of the script has been removed to shorten the example.
while :
do
{
rm -f $fifo
mkfifo $fifo
cat $fifo &
CatPid=$!
b...
Hello everyone,
I have implemented FIFO semaphores but now I need a way to test/prove that they are working properly. A simple test would be to create some threads that try to wait on a semaphore and then print a message with a number and if the numbers are in order it should be FIFO, but this is not good enough to prove it because that ...
I have two programs, Writer and Reader.
I have a FIFO from Writer to Reader so when I write something to stdin in Writer, it gets printed out to stdout from Reader.
I tried doing this with TWO Readers open, and I got output to stdout from only one of the two Reader programs. Which Reader program Unix chooses to print stdout from seemed...
I am using IDS 10 and I have a simple transaction table with the inventory changes with product ID, transaction time, volume, quantity and price.
Is it possible to determine the FIFO valuation solely with SQL/Stored procedures or do I need to use something like Perl with DBI for the cursor handling?
Fifo valuation requires cursor-handlin...