Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: ports/nacl-spawn/include/spawn.h

Issue 1742043002: Make M-x shell work in emacs. (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/gcc/build.sh ('k') | ports/nacl-spawn/nacl_apipe.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/nacl-spawn/include/spawn.h
diff --git a/ports/nacl-spawn/include/spawn.h b/ports/nacl-spawn/include/spawn.h
index c08d0d7e60b870fd217e78d4bdc3c770a5fb7891..d9d528fe65a0829132bd8a594bb9f2d983863e37 100644
--- a/ports/nacl-spawn/include/spawn.h
+++ b/ports/nacl-spawn/include/spawn.h
@@ -60,6 +60,39 @@ int spawnve(int mode, const char* path, char *const argv[], char *const envp[]);
void jseval(const char* cmd, char** data, size_t* len);
/*
+ * Create a pipe that can communicate cross-process via JS.
+ *
+ * Args:
+ * pipefd: Point to place to store a read [0] and write [1] fd.
+ * Returns:
+ * Zero on success.
+ * TODO(bradnelson): The should work differently, see both:
+ * https://bugs.chromium.org/p/webports/issues/detail?id=247
+ * https://bugs.chromium.org/p/webports/issues/detail?id=248
+ * Only declared when pipe is not defined as doing -Dpipe=nacl_spawn_pipe
+ * is a common (though not universal) way to inject this.
+ * In this case, system headers declaration of pipe don't always match
+ * this definition of pipe.
+ */
+#if !defined(pipe)
+int nacl_spawn_pipe(int pipefd[2]);
+#endif
+
+/*
+ * Create a pipe that can communicate cross-process via JS w/ flags.
+ *
+ * Args:
+ * pipefd: Point to place to store a read [0] and write [1] fd.
+ * flags: Flags to create the fd's with (for example O_NONBLOCK).
+ * Returns:
+ * Zero on success.
+ * TODO(bradnelson): The should work differently, see both:
+ * https://bugs.chromium.org/p/webports/issues/detail?id=247
+ * https://bugs.chromium.org/p/webports/issues/detail?id=248
+ */
+int nacl_spawn_pipe2(int pipefd[2], int flags);
+
+/*
* Implement vfork as a macro.
*
* Returns:
« no previous file with comments | « ports/gcc/build.sh ('k') | ports/nacl-spawn/nacl_apipe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698