Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Or install it yourself as:

## Usage

Open /tmp/tempfile as a write-only file that is created if it doesn't
Open `/tmp/tempfile` as a write-only file that is created if it doesn't
exist:

```
```ruby
require 'fcntl'

fd = IO.sysopen('/tmp/tempfile',
Expand All @@ -42,15 +42,15 @@ f.syswrite("TEMP DATA")
f.close
```

Get the flags on file +s+:
Get the flags on file `s`:

```
```ruby
m = s.fcntl(Fcntl::F_GETFL, 0)
```

Set the non-blocking flag on +f+ in addition to the existing flags in +m+.
Set the non-blocking flag on `f` in addition to the existing flags in `m`.

```
```ruby
f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m)
```

Expand Down