30 lines
581 B
C
30 lines
581 B
C
/*
|
|
* This file is part of attach-f-p strace test.
|
|
*
|
|
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
|
|
* Copyright (c) 2016-2018 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;
|
|
}
|