Skip to content

Commit 5e3f82c

Browse files
committed
pty: Fix missing arguments
1 parent 6e4a60a commit 5e3f82c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/pty/pty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
491491
if ((slavefd = rb_cloexec_open(SlaveName,O_RDWR,0)) >= 0) {
492492
rb_update_max_fd(slavefd);
493493
*slave = slavefd;
494-
if (change_owner(slavefd, getuid(), getgid()) != 0) goto error;
495-
if (change_mode(slavefd, nomesg ? 0600 : 0622) != 0) goto error;
494+
if (change_owner(SlaveName, slavefd, getuid(), getgid()) != 0) goto error;
495+
if (change_mode(SlaveName, slavefd, nomesg ? 0600 : 0622) != 0) goto error;
496496
return 0;
497497
}
498498
close(masterfd);

0 commit comments

Comments
 (0)