vibe.d - asynchronously wait() for process to exit

Johannes Pfau via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 21 05:02:15 PDT 2016


Am Tue, 21 Jun 2016 03:01:39 +0000
schrieb Vladimir Panteleev <thecybershadow.lists at gmail.com>:

> 
> As I recently learned, there's also signalfd. With that, had 
> Vibe.d had a primitive to wrap a file descriptor into a stream it 
> can manage, it would be as simple as reading from it. But it 
> doesn't seem to have one so I guess you need to use 
> createFileDescriptorEvent and the raw C read() function.

Such a wrapper would be useful for some more things (inotify/fanotify).
Anyway, I wrote such a similar wrapper for a serial port module:
https://github.com/jpf91/vibe-serial/blob/master/src/vibe/serial.d#L145

Only reading is fully implemented / tested, but maybe this is still
useful. This vibe.d issue could cause problems though:

https://github.com/rejectedsoftware/vibe.d/issues/695



More information about the Digitalmars-d-learn mailing list