[OpenWrt-Devel] [PATCH procd] service: use PTY (instead of a pipe) for reading service output

Jo-Philipp Wich jow at openwrt.org
Fri Jun 19 10:14:30 EDT 2015


Hi.

> Do you have any other idea?

Yes, we create a shared library which calls setbuf(stderr/out, NULL) in
an __attribute__((constructor)) function, then specify this library in
LD_PRELOAD when exec'ing stdio-relay enabled processes from procd.

This is equivalent to the implementation used by the coreutils "stdbuf"
applet.

~ Jow
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list