aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/fclose.c
blob: 15d0f85d8ebc941acc3e524f37bab87bfa244e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* 
 * Copyright (c) 2008-2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * static int
 * wrap_fclose(FILE *fp) {
 *	int rc = -1;
 */

	if (!fp) {
		errno = EFAULT;
		return -1;
	}
	int fd = fileno(fp);
	pseudo_client_op(OP_CLOSE, 0, fd, -1, 0, 0);
	rc = real_fclose(fp);

/*	return rc;
 * }
 */