>What exactly does PROP_IPC (fd_INTERPROCESSABLE in the source) permit?

Whether sending the file as eg stdin or stdout is supported by the OS.

The only platform where this flag is relevant is on WIN32, where
notably sockets don't have the flag set (cf src/fdlib.h).

>Consider this usage:
>
>object stdout = Stdio.File();
>Process.create_process(cmd, (["stdout": stdout->pipe()]);
>
>Is this at risk of failing, where stdout->pipe(Stdio.PROP_IPC) would succeed?

Not currently, as the default type of pipe generated by pipe() is
fd_pipe() (which maps to CreatePipe on WIN32 and is IPC capable).

>I can't find anything that indicates exactly what "IPC" means, and
>whether using one end of a pipe for a process's standard stream counts
>as IPC. It seems like it ought to, but the Pike standard library isn't
>consistent about requesting it (see Sql.pmod/rsql.pike:36,
>Git.pmod/Export.pike:46, and githelper.pike:60 from the companion
>repo).

Most of the stuff has probably only ever been tested on
POSIX.1-similar systems, where the flag isn't relevant.

>In _Stdio/file.c, file_pipe(), checks are made for a pipe (if
>PIPE_CAPABILITIES is defined), a socketpair, or a socketpair_ultra.
>All three of these have fd_INTERPROCESSABLE set, so far as I can tell.
>Does that imply that PROP_IPC is effectively always implied when
>creating a pipe?

Not on WIN32.
  • Stdio.File()->... Chris Angelico
    • Stdio.File(... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
    • Re: Stdio.F... Chris Angelico
      • Re: Std... Henrik Grubbström (Lysator) @ Pike (-) developers forum

Reply via email to