Skip to content

Commit

Permalink
fix(pty) install warning
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Sep 12, 2014
1 parent 18238d3 commit 5fa272f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/unix/pty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ NAN_METHOD(PtyFork) {
case -1:
return NanThrowError("forkpty(3) failed.");
case 0:
if (strlen(cwd)) chdir(cwd);

if (strlen(cwd) && chdir(cwd))
perror("chdir failed");

if (uid != -1 && gid != -1) {
if (setgid(gid) == -1) {
perror("setgid(2) failed.");
Expand Down

0 comments on commit 5fa272f

Please sign in to comment.