/
githubmirror
/
strace
Обзор
Документация
Войти
/
githubmirror
/
strace
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.13
tests/pipe.c
36 строк
556 B
Dmitry V. Levin
Update copyright headers
16 фев 2021, 11:00
16 фев 2021, 11:00
8fa8a88
Код
Авторство
О чём код?
/* * Check decoding of pipe syscall. * * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@strace.io> * Copyright (c) 2015-2021 The strace developers. * All rights reserved. * * SPDX-License-Identifier: GPL-2.0-or-later */ #include "tests.h" #include "scno.h" #ifdef __NR_pipe # include <stdio.h> # include <fcntl.h> # include <unistd.h> int main(void) { (void) close(0); (void) close(1); int *const fds = tail_alloc(sizeof(*fds) * 2); if (pipe(fds)) perror_msg_and_fail("pipe"); return 0; } #else SKIP_MAIN_UNDEFINED("__NR_pipe") #endif