is there any API to watch gpr_subprocess_* stdout/stderr?

30 views
Skip to first unread message

kang joni

unread,
Jul 23, 2016, 3:10:37 PM7/23/16
to grpc.io
I want to watch subprocess worker data, something like either stdout or stderr, whether is supported use case now?

Craig Tiller

unread,
Jul 23, 2016, 3:31:02 PM7/23/16
to kang joni, grpc.io

It's not right now: the subprocess API is just what we've found we needed to write unit tests for gRPC.


On Sat, Jul 23, 2016, 12:10 PM kang joni <kangj...@gmail.com> wrote:
I want to watch subprocess worker data, something like either stdout or stderr, whether is supported use case now?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/71cf9e4a-3220-496f-ac63-0e598d94df71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Grosu

unread,
Jul 23, 2016, 4:20:48 PM7/23/16
to grpc.io, kangj...@gmail.com

Hi Kang,

Autonomy is a given with any piece of code :)  Since gRPC code is built with quite a lot of flexibility, if you need to for your own instance, you can easily add to subprocess_posix.c the dup2/fork/pipe combo to grab the stdout/stderr and watch it.

Hope it helps,
Paul

kang joni

unread,
Jul 23, 2016, 4:30:07 PM7/23/16
to grpc.io, kangj...@gmail.com
Thanks for your suggestion. But I'm just hoping to write in portable manner (Win/Lin).

Paul Grosu

unread,
Jul 23, 2016, 6:51:09 PM7/23/16
to grpc.io, kangj...@gmail.com

Well, for Windows using C# you might need to add the appropriate method references to grpc_csharp_ext.c and NativeMethods.cs
Reply all
Reply to author
Forward
0 new messages