115 questions
1 vote
0 answers
42 views
How can client exit while using fork in jsonrpc-c server
I am using jsonrpc-c to write a remote shell toy. The client side uses nc to send request to server: echo "{\"method\":\"sayHello\"}" | nc localhost 1234 The code of the ...
2 votes
1 answer
444 views
UNIX socket read happening even though client does not send data
I am facing a very strange issue, I have a simple UNIX STREAM socket server/client code running on Linux. client occasionally sends a message to server (I tested with sending only once also), however ...
0 votes
1 answer
1k views
What is the right way to publish message to RabbitMq with AMQP-CPP?
I want to use RabbitMq in my c++ program. I desided to use AMQP-CPP for this. When I used class MyConnectionHandler : public AMQP::ConnectionHandler from README file my messages weren't sent. Here is ...
0 votes
1 answer
108 views
SIGINT getting generated in a program using libev
Hi I am dealing with a problem on Mac OS 13.1, while using libev, opening a DLL (libcrypto.3.dylib) and then doing popen to run a shell command and read the ouptut to a string. The scenario in the ...
-2 votes
2 answers
311 views
what this syntax in libev C language?
While reading the doc in libev I find some C code of which the syntax is quite weird. static void stdin_cb (EV_P_ ev_io *w, int revents) { puts ("stdin ready"); // for one-shot ...
0 votes
1 answer
446 views
libev's IO watcher runs onto error if underlying FD is closed
I'm using libev for watching FD events, but sometimes I need to close the underlying FD. Therefore, I'm stopping the IO watcher (by calling its stop function), but it seems not enough, as I'm still ...
1 vote
2 answers
1k views
How does nodejs event loop keep running without a for/while forever loop?
I read Nodejs Event Loop and "Event Loop Explained" and Don't Block the Event Loop I don't think there is a for/while forever loop in nodejs code (js or c++), e.g. as here explains libev ...
1 vote
0 answers
369 views
Integrate the Glib main loop into the libev event loop (C++)
I am trying to integrate the Glib main loop into the libev event loop. Actually, I am using their C++ wrappers: glibmm [1] and ev++ [2]. The main idea was taken from the EV::Glib Perl module [3]. ...
1 vote
1 answer
306 views
porting sd-bus event to libev
The sd-event is a event loop framework similar to libev, libuv, libevent, etc, I need to implement libev event loop for monitoring services. All the man pages I can find talk about the use of ...
0 votes
0 answers
64 views
IO-starving causes?
I have a kind of a complex application, which uses heavy IO: it includes ffmpeg and doing video transcoding (by software, no HW-acceleration is available). This might be unimportant, but I wanted to ...
2 votes
1 answer
318 views
Is there an easy way to wake up my program when a Vulkan fence is signalled?
I'm writing a program that uses libev to wait on many file descriptors. When data comes in, a vulkan compute shader gets run to process the data. The completion of that shader is signalled with a ...
0 votes
1 answer
88 views
Running EvPeriodic with a loop
I am trying to run EvPeridoc to log data periodically (every 15 minutes, i.e 900 seconds) to a file. <?php $tolog = ''; $w = new EvPeriodic(fmod(Ev::now(), 900), 900, NULL, function($w, $revents) { ...
0 votes
0 answers
421 views
How to use threads with libev
I'm making a webcrawler and want to spawn a number of threads each with its own event loop to monitor network activity. Here is my code so far: static void my_cb(EV_P_ struct ev_io *w, int revents) { ...
1 vote
1 answer
407 views
Weird timeout from ev_timer
Recently I was trying code libev with threads I just noticed timer always ends at near 60~ second no matter what you set it lower than 60 second. I'm not sure what causes it but I tried make code ...
1 vote
1 answer
1k views
C++ libhiredis with libev and custom event loop
My application uses libhiredis with libev backend. I need to send Redis async commands and process the resulting Redis async callback. However, unlike the simple example from here I cannot use the ...