/*
 * /proc/self/task/tid: path2glob tid globbing
 */

#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>

int main(void)
{
	char path[64];
	pid_t tid = syscall(SYS_gettid);
	snprintf(path, sizeof(path), "/proc/self/task/%d/status", tid);
	int fd = open(path, O_RDONLY);
	if (fd >= 0) {
		char buf[1];
		read(fd, buf, 1);
		close(fd);
	}
	return 0;
}
