-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
O_CLOEXEC used in
async-process/src/async-process.c
Line 7 in 3b16b91
| int fd = posix_openpt(O_RDWR | O_CLOEXEC | O_NOCTTY); |
This fixed it for me (recompile with bootstrap and copy like so cp static/amd64/OpenBSD/libasyncprocess.so /usr/local/lib):
static const char* open_pty(int *out_fd)
{
int fd = posix_openpt(O_RDWR | O_NOCTTY);
if (fd < 0) return NULL;
if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
close(fd);
return NULL;
}
if (grantpt(fd) == -1 || unlockpt(fd) == -1) {
close(fd);
return NULL;
}
//if (grantpt(fd) == -1 || unlockpt(fd) == -1) return NULL;
//fcntl(fd, F_SETFD, FD_CLOEXEC);
const char *name = ptsname(fd);
if (name == NULL) {
close(fd);
return NULL;
}
*out_fd = fd;
return name;
}
Is it possible to change the code please ?
Metadata
Metadata
Assignees
Labels
No labels