Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 09, 2014
@FROGGS FROGGS do not stat a file without filename
When we are reading from STDIN, we have no filename set, so dont try to stat a real file.
This patch was brought to you by jnthn++ :o)
78994df
@FROGGS FROGGS pass STDIN to subprocess in shell()
... so the child process can read from our STDIN when it creates a prompt.
abe4c1e
Showing with 5 additions and 3 deletions.
  1. +2 −1 src/io/procops.c
  2. +3 −2 src/io/syncfile.c
View
3 src/io/procops.c
@@ -129,7 +129,8 @@ MVMObject * MVM_proc_getenvhash(MVMThreadContext *tc) {
#define SPAWN(shell) do { \
process->data = &result; \
- process_stdio[0].flags = UV_IGNORE; \
+ process_stdio[0].flags = UV_INHERIT_FD; \
+ process_stdio[0].data.fd = 0; \
process_stdio[1].flags = UV_INHERIT_FD; \
process_stdio[1].data.fd = 1; \
process_stdio[2].flags = UV_INHERIT_FD; \
View
5 src/io/syncfile.c
@@ -183,8 +183,9 @@ static MVMint64 eof(MVMThreadContext *tc, MVMOSHandle *h) {
uv_fs_t req;
if (data->ds && !MVM_string_decodestream_is_empty(tc, data->ds))
return 0;
- if ((r = uv_fs_lstat(tc->loop, &req, data->filename, NULL)) == -1)
- MVM_exception_throw_adhoc(tc, "Failed to stat in filehandle: %d", errno);
+ if (data->filename)
+ if ((r = uv_fs_lstat(tc->loop, &req, data->filename, NULL)) == -1)
+ MVM_exception_throw_adhoc(tc, "Failed to stat in filehandle: %d", errno);
if ((seek_pos = MVM_platform_lseek(data->fd, 0, SEEK_CUR)) == -1)
MVM_exception_throw_adhoc(tc, "Failed to seek in filehandle: %d", errno);
return req.statbuf.st_size == seek_pos;

No commit comments for this range

Something went wrong with that request. Please try again.