blob: 0e485c04196be145f7d100f4e2acea509af3f90f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* This file is part of attach-f-p strace test.
*
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
* Copyright (c) 2016-2017 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "tests.h"
#include <stdio.h>
#include <unistd.h>
int
main(void)
{
skip_if_unavailable("/proc/self/task/");
static const char dir[] = "attach-f-p.test cmd";
pid_t pid = getpid();
int rc = chdir(dir);
printf("%-5d chdir(\"%s\") = %s\n"
"%-5d +++ exited with 0 +++\n",
pid, dir, sprintrc(rc), pid);
return 0;
}
|