fixed a fault in pty.c

This commit is contained in:
hyung-hwan 2022-02-14 17:01:44 +00:00
parent 0e08295431
commit b042d4e045
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#include <hio-sck.h> #include <hio-sck.h>
#include <hio-http.h> #include <hio-http.h>
#include <hio-dhcp.h>
#include <hio-utl.h> #include <hio-utl.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -147,7 +147,7 @@ static pid_t standard_fork_and_exec (hio_dev_pty_t* dev, int pfds[], hio_dev_pty
if (dup2(pfds[1], 0) == -1 || dup2(pfds[1], 1) == -1 || dup2(pfds[1], 2) == -1) goto slave_oops; if (dup2(pfds[1], 0) == -1 || dup2(pfds[1], 1) == -1 || dup2(pfds[1], 2) == -1) goto slave_oops;
close (pfds[1]); close (pfds[1]);
pfds[1] == HIO_SYSHND_INVALID; pfds[1] = HIO_SYSHND_INVALID;
/* TODO: pass environment like TERM */ /* TODO: pass environment like TERM */
execv (param->argv[0], param->argv); execv (param->argv[0], param->argv);