Skip to content

Commit

Permalink
Attempt to fix process expansion on Linux
Browse files Browse the repository at this point in the history
Hopefully addresses #455
  • Loading branch information
ridiculousfish committed Dec 18, 2012
1 parent f9697c8 commit 882a62a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int fgetws2(wcstring *s, FILE *f)

c = getwc(f);

if (errno == EILSEQ)
if (errno == EILSEQ || errno == EINTR)
{
continue;
}
Expand Down
2 changes: 0 additions & 2 deletions expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,7 @@ bool process_iterator_t::next_process(wcstring *out_str, pid_t *out_pid)
if ((cmdfile=wfopen(path + L"/cmdline", "r")))
{
wcstring full_command_line;
signal_block();
fgetws2(&full_command_line, cmdfile);
signal_unblock();

/* The command line needs to be escaped */
cmd = tok_first(full_command_line.c_str());
Expand Down

0 comments on commit 882a62a

Please sign in to comment.