Spawning a subprocess with glib/gio

I'm trying to spawn a subprocess with glib/gio, but I get a runtime error. The highlevel-call is here, and the code calls the following function, with a panic on the line marked.

The panic message is semi-helpfull:

(process:32360): GLib-GIO-CRITICAL **: 21:16:58.084: g_subprocess_get_stdout_pipe: assertion 'subprocess->st
dout_pipe' failed
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/0de96d37fbcc54978458c18f5067
cd9817669bc8/src/libcore/macros/mod.rs:15:40

and the backtrace doesn't really tell me more. Seems the stdout could not be piped to my binary? But I passed the proper flags, and now I have no idea how to go on.

Any idea what could be going on, or how I could proceed to investigate further? Thanks for any pointers!

The problem was that bitflags work differently from what I assumed. In this line, replacing & by | makes it all work.