Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

head: cannot open '/proc/1/sched' for reading: No such file or directory #301

Closed
0-st opened this issue Oct 8, 2022 · 6 comments
Closed
Labels
🐛 bug something that doesn't works as expected 🚀 enhancement performance, UX or maintainability

Comments

@0-st
Copy link

0-st commented Oct 8, 2022

Also prints ~ 2<user@host>2 instead of ~ user@host when logged in over ssh.

The workaround in #295 (comment) works for hiding the head: cannot open... lines.

Env

Pure

4.2.3

Fish

fish, version 3.5.1

OS/distribution

LSB Version:    1.0
Distributor ID: VoidLinux
Description:    Void Linux
Release:        rolling
Codename:       void
@edouard-lopez edouard-lopez added 🐛 bug something that doesn't works as expected 🚀 enhancement performance, UX or maintainability labels Oct 10, 2022
@edouard-lopez
Copy link
Member

Degugging

Do you have /proc/ directory in VoidLinux, I'm using it in both the pid method and the cgroup method.

If so, could you share the output of:

cat /proc/1/cgroup

Container Detection Feature Flag

I will add a flag to disable the container detection feature

Format over SSH

Would you mind opening a new issue with more context of what you have/expect? This way I will be able to address it more efficiently.

@0-st
Copy link
Author

0-st commented Oct 10, 2022

The output of cat /proc/1/cgroup is:

14:name=elogind:/
13:misc:/
12:pids:/
11:hugetlb:/
10:net_prio:/
9:perf_event:/
8:net_cls:/
7:freezer:/
6:devices:/
5:memory:/
4:blkio:/
3:cpuacct:/
2:cpu:/
1:cpuset:/
0::/

@edouard-lopez
Copy link
Member

Could you check the behavior of PR #302 ?

❯ fisher install pure-fish/pure@fix/301-voidlinux-container-detection

@faho
Copy link
Contributor

faho commented Oct 14, 2022

It seems to me like _pure_detect_container_by_pid_method should test if /proc/1/sched exists before using it.

@edouard-lopez
Copy link
Member

@faho I added the check

@0-st
Copy link
Author

0-st commented Oct 14, 2022

Sorry for the late reply, after the last commit to PR302 I don't get the error anymore.

I'll submit a new, more detailed, issue for the promt rendering issue in a couple days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug something that doesn't works as expected 🚀 enhancement performance, UX or maintainability
Projects
None yet
Development

No branches or pull requests

3 participants