lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 May 2009 14:36:03 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Ramagudi Naziir <naziirr@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: serial device and fsync

On Mon, 25 May 2009 12:50:22 +0300
Ramagudi Naziir <naziirr@...il.com> wrote:

> Hi all,
> 
> I need to write(2) a certain character to a serial device (using the
> standard /dev/ttySx), and make sure it was transferred to the device
> before I continue. I tried fsync(2), but that failed (does fsync even
> apply to character devices or only block devices ?).

Block devices
> 
> Any idea ?

Most hardware UARTs actually can't do this but the kernel will do its
best. The POSIX interface you want is tcdrain(fd). Quite why POSIX didn't
use fsync is a very good question.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ