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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « ports/gcc/build.sh ('k') | ports/nacl-spawn/nacl_apipe.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include <setjmp.h> 7 #include <setjmp.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/wait.h> 9 #include <sys/wait.h>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 * Synchronously eval JavaScript. 53 * Synchronously eval JavaScript.
54 * 54 *
55 * Args: 55 * Args:
56 * cmd: Null terminated string containing code to eval. 56 * cmd: Null terminated string containing code to eval.
57 * data: Pointer to a char* to receive eval string result. 57 * data: Pointer to a char* to receive eval string result.
58 * len: Pointer to a size_t to receive the length of the result. 58 * len: Pointer to a size_t to receive the length of the result.
59 */ 59 */
60 void jseval(const char* cmd, char** data, size_t* len); 60 void jseval(const char* cmd, char** data, size_t* len);
61 61
62 /* 62 /*
63 * Create a pipe that can communicate cross-process via JS.
64 *
65 * Args:
66 * pipefd: Point to place to store a read [0] and write [1] fd.
67 * Returns:
68 * Zero on success.
69 * TODO(bradnelson): The should work differently, see both:
70 * https://bugs.chromium.org/p/webports/issues/detail?id=247
71 * https://bugs.chromium.org/p/webports/issues/detail?id=248
72 * Only declared when pipe is not defined as doing -Dpipe=nacl_spawn_pipe
73 * is a common (though not universal) way to inject this.
74 * In this case, system headers declaration of pipe don't always match
75 * this definition of pipe.
76 */
77 #if !defined(pipe)
78 int nacl_spawn_pipe(int pipefd[2]);
79 #endif
80
81 /*
82 * Create a pipe that can communicate cross-process via JS w/ flags.
83 *
84 * Args:
85 * pipefd: Point to place to store a read [0] and write [1] fd.
86 * flags: Flags to create the fd's with (for example O_NONBLOCK).
87 * Returns:
88 * Zero on success.
89 * TODO(bradnelson): The should work differently, see both:
90 * https://bugs.chromium.org/p/webports/issues/detail?id=247
91 * https://bugs.chromium.org/p/webports/issues/detail?id=248
92 */
93 int nacl_spawn_pipe2(int pipefd[2], int flags);
94
95 /*
63 * Implement vfork as a macro. 96 * Implement vfork as a macro.
64 * 97 *
65 * Returns: 98 * Returns:
66 * Pid of a child, or zero if in the child. 99 * Pid of a child, or zero if in the child.
67 * 100 *
68 * Done as a macro in order to allow portable implementation of 101 * Done as a macro in order to allow portable implementation of
69 * vfork's behavior, which requires multiple returns from the same 102 * vfork's behavior, which requires multiple returns from the same
70 * code location. 103 * code location.
71 * A before function is called to setup vfork state, 104 * A before function is called to setup vfork state,
72 * followed by setjmp passing its result to an after function. 105 * followed by setjmp passing its result to an after function.
(...skipping 26 matching lines...) Expand all
99 * The newer version of glibc already declared execvpe 132 * The newer version of glibc already declared execvpe
100 */ 133 */
101 #if !defined(__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9) 134 #if !defined(__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
102 int execvpe(const char *file, char *const argv[], char *const envp[]); 135 int execvpe(const char *file, char *const argv[], char *const envp[]);
103 #endif 136 #endif
104 int execlpe(const char *path, const char *arg, ...); /* char* const envp[] */ 137 int execlpe(const char *path, const char *arg, ...); /* char* const envp[] */
105 138
106 __END_DECLS 139 __END_DECLS
107 140
108 #endif /* NACL_SPAWN_SPAWN_H_ */ 141 #endif /* NACL_SPAWN_SPAWN_H_ */
OLDNEW
« 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