Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

Commit

Permalink
Install: Fix warning about chdir(2) return value being ignored.
Browse files Browse the repository at this point in the history
Merging PR chjj#86 from @coderaiser, commit chjj@5fa272f

Fixes chjj#73.
Closes chjj#86.
  • Loading branch information
JamesMGreene committed Jun 22, 2015
1 parent a9f5a1c commit 553f3a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unix/pty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ NAN_METHOD(PtyFork) {
case -1:
return NanThrowError("forkpty(3) failed.");
case 0:
if (strlen(cwd)) chdir(cwd);
if (strlen(cwd) && chdir(cwd))
perror("chdir(2) failed: " + cwd);

if (uid != -1 && gid != -1) {
if (setgid(gid) == -1) {
Expand Down

0 comments on commit 553f3a3

Please sign in to comment.