Handling EOF on stdin

Sid Hussmann sid.hussmann at gapfruit.com
Wed Dec 4 15:29:11 CET 2019


Dear Genodians,

we have a scenario where a java application reads from stdin and writes to stdout and stderr. In our current implementation a component provides a terminal session and a log session to where the jvm connects stdin, stdout and stderr accordingly. The java application needs to know when the input of data on stdin is finished. From the java applications perspective this is easiest done by reading until a EOF signal is received.

So a first tempting approach to this problem would be to extend the Terminal session interface with a signal handler for EOF. However... I'm hesitant to touch such a prominent session. 

Is there an other approach to this? Maybe using the newly released vfs pipe plugin? Or via emulation of POSIX signals?

Yours truly,
Sid


-- 
Sid Hussmann
CTO & Founder
gapfruit AG
Baarerstrasse 135
6300 Zug - Switzerland
+41 79 543 46 41
sid.hussmann at gapfruit.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.genode.org/pipermail/users/attachments/20191204/eac9900f/attachment.sig>


More information about the users mailing list