Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

inappropriate ioctl for device #6028

Closed
thomas92911 opened this issue Feb 27, 2019 · 5 comments · Fixed by ipfs/go-ipfs-cmds#147 or #6037
Closed

inappropriate ioctl for device #6028

thomas92911 opened this issue Feb 27, 2019 · 5 comments · Fixed by ipfs/go-ipfs-cmds#147 or #6037
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@thomas92911
Copy link

Version: 0.4.19-rc1
Type: meta
OS: MacOS Mojave 10.14.3
Go Version: 1.12 darwin/amd64

Some commands such as ipfs id display an error at the end.

Error: sync /dev/stderr: inappropriate ioctl for device
Stebalien added a commit to ipfs/go-ipfs-cmds that referenced this issue Feb 27, 2019
In go1.12, go switched how `file.Sync()` works on macos. Unfortunately, this
also changed the "not supported" error to ENOTTY (called ENOTTY for legacy
reasons) on macos.

fixes ipfs/kubo#6028
@ghost ghost assigned Stebalien Feb 27, 2019
@ghost ghost added the status/in-progress In progress label Feb 27, 2019
@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Feb 27, 2019
@Stebalien
Copy link
Member

Thanks for the report, we should have a fix in ipfs/go-ipfs-cmds#147.

@thomas92911
Copy link
Author

thomas92911 commented Mar 1, 2019

ipfs swarm peers|grep * still has this problem.

Error: sync /dev/stdout: bad file descriptor

@Stebalien
Copy link
Member

  1. Does that happen without the pipe?
  2. Does that happen when piping to cat?

@Stebalien Stebalien reopened this Mar 1, 2019
@michaelavila
Copy link
Contributor

@Stebalien @thomas92911 I'm testing this with 0.4.19-rc2, but see the same error for the same command:

$ ipfs swarm peers | grep "*"
Error: sync /dev/stdout: bad file descriptor
  • I do not see the error when not piping to anything.
  • I do not see the error when piping to cat.
  • I do not see the error when using a different grep expression, e.g. ipfs swarm peers | grep "/".

@michaelavila
Copy link
Contributor

I actually see this behavior with any grep that does not produce a result, e.g.:

$ ipfs swarm peers | grep "blarg"
Error: sync /dev/stdout: bad file descriptor

Stebalien added a commit that referenced this issue Mar 1, 2019
fixes #6028, fixes crash when writing after closing on flatfs.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@ghost ghost added the status/in-progress In progress label Mar 1, 2019
@ghost ghost removed the status/in-progress In progress label Mar 1, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants