commit c632297d7b6d7267543afeb7b052dc8a970cdefe from: Josh Rickmar date: Sun Jul 03 21:49:23 2022 UTC Use pipe() which is a more understood syscall than pipe2() which doesn't exist on MacOS, for instance. Since we we're passing in 0 to pipe2(), this mean no fcntl() flags were being sent. As such, it's the same syscall as pipe() which also has the added benefit that it's more portable. committing on behalf of thomas with my ok commit - 2c0a0d66f9ad7d4ac44536836679ed1d27a8ce33 commit + c632297d7b6d7267543afeb7b052dc8a970cdefe blob - 0b04e3f959ed7aab07534ee9bb5cb4a63e0dd93f blob + bbdfb381160453fb6cdcae5a97db2425cc3b4f3f --- lib/sigs.c +++ lib/sigs.c @@ -99,10 +99,10 @@ got_sigs_sign_tag_ssh(pid_t *newpid, int *in_fd, int * argv[i++] = NULL; assert(i <= nitems(argv)); - if (pipe2(in_pfd, 0) == -1) - return got_error_from_errno("pipe2"); - if (pipe2(out_pfd, 0) == -1) - return got_error_from_errno("pipe2"); + if (pipe(in_pfd) == -1) + return got_error_from_errno("pipe"); + if (pipe(out_pfd) == -1) + return got_error_from_errno("pipe"); pid = fork(); if (pid == -1) { @@ -321,12 +321,12 @@ got_sigs_verify_tag_ssh(char **msg, struct got_tag_obj argv[i++] = NULL; assert(i <= nitems(argv)); - if (pipe2(in_pfd, 0) == -1) { - error = got_error_from_errno("pipe2"); + if (pipe(in_pfd) == -1) { + error = got_error_from_errno("pipe"); goto done; } - if (pipe2(out_pfd, 0) == -1) { - error = got_error_from_errno("pipe2"); + if (pipe(out_pfd) == -1) { + error = got_error_from_errno("pipe"); goto done; }