summaryrefslogtreecommitdiff
path: root/src/termios/tcdrain.c
blob: 9ff1ecd5629537346c720e444a2f6ab2c37284e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <termios.h>
#include <sys/ioctl.h>
#include "libc.h"

int tcdrain(int fd)
{
	int ret;
	CANCELPT_BEGIN;
	ret = ioctl(fd, TCSBRK, 1);
	CANCELPT_TRY;
	CANCELPT_END;
	return ret;
}