bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do we intercept file saving or output to stdout directly


From: Greg Wooledge
Subject: Re: How do we intercept file saving or output to stdout directly
Date: Wed, 26 Aug 2020 08:13:52 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Aug 26, 2020 at 12:01:26AM -0400, Dale R. Worley wrote:
> open("/dev/stdout", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)
> write(2, "Error:            ", 18Error:            )      = 18
> write(2, "Cannot open \"/dev/stdout\" to wri"..., 56Cannot open "/dev/stdout" 
> to write keyboard description
> ) = 56
> 
> The open() is done with the O_EXCL flag.  Reading the manual page
> open(2), I see that O_EXCL requires that the open() call creates the
> file.
> 
> It's not clear why xkbcomp has this behavior, but it seems likely that
> this is done for a specific reason.  So you will have to ask whoever
> maintains it.

The obvious guess is that it's to "prevent you from accidentally
overwriting a file".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]