38
Condor
6y

I love Linux, but its community can be so full of incompetent assholes..

Just now I asked in Freenode ##linux how to get the process ID of my current running process in bash. I got my answer - it's a shell built-in called "$$".

Then people start to nitpick some more - why do you need it? How is that different from an exit? - to which my response was.. well I know the whole idea behind exit codes, and I'd use it whenever possible, in all defined behavior that allows my program to terminate itself whenever it can. This pidfile however would be used to exit itself and provide diagnostic information whenever the program enters undefined behavior - a segfault in C language. Scenarios in which I don't have full control over the script's behavior anymore, such as the system entering an unworkable state where the system stalled, still got some binaries in RAM but the rootfs got unwritable, such as now - very helpfully, thanks HP! - when my laptop likely overheated and shat itself. I issued sudo reboot into it, but even that wouldn't issue properly anymore due to the /sbin/poweroff binary becoming inaccessible too. I had to issue a hard power cycle.. one of the few times in which I'm thankful to HP for actually causing shit like this, lol.

Point is, that undefined behavior is what I'm trying to mitigate against. I certainly can't let any files other than diagnostics remain in nonvolatile storage like that, especially when their state should be predictable in order to ensure good operation (like files expressing whether the script is already running or not, i.e. lock files).

Back to that IRC chat. Aside from the answer, I got ridicule from people who probably don't even know how to properly compile a kernel. Ubuntu users, overconfident scum. Sometimes I feel like I should ask questions in channels like #archlinux only, where such incompetency is ridiculed on its own.

Comments
  • 6
    Point being that this is part of a larger scheme to mitigate critical errors. Exit commands would be able to get the program to exit whenever that binary is accessible in rootfs storage or in RAM. However in an unworkable state like the one I'm targeting and in which I'd like to know my options when I don't have control over the script's behavior anymore, that may not be an option...

    On second thought, if the rootfs becomes inaccessible, writing diagnostics to permanent storage would be impossible too. Perhaps (over-)writing a status to a diagnostics log during normal program execution and hoping for the best while the system crashes would be the most viable option... lock files could be kept in memory and those would be removed along with the process after a power cycle anyway.
  • 2
    Are you not storing your lockfiles in a tempfs? (/var/lock or /run/lock)
  • 8
    tldr; the Linux communities are full of assholes because a couple of people picked on OP.

    Gotcha 👍
  • 3
    @Condor you are obviously part of the linux community therefore my advice for you is to help improve the community so that you are (in an ideal future) the last person with such a bad experience. Since anyone can make a change or drive the community forward and linux needs people making it more accessible to others not people complaining about stuff thats bad (simply because this normally changes nothing).
  • 4
    @shaji if you're offended, fine by me. Be offended. I feed on that. I'm saying that there's a fuckload of arrogant motherfuckers out there, just like there is arrogant "developers" who just made themselves a hello world and call themselves leet ass "Python Lords".

    @bootleg-dev the code that I looked back at which I made the last change to a year ago and then discarded didn't.. it only used a file in /tmp. I should've known better.

    @mee4895 that's what I'm aspiring to. There's a lot of newbies that ask questions that they should instead put in a search engine, but those who ask questions backed by previous (search) experience, I often wholeheartedly welcome and try my best to answer 🙂
  • 3
    i know the other end of that very well - if someone comes into a help channel and asks a question, you can never be sure if it's a noob. so you try to guess what he's trying to do, and give him an easier way to do it. that's most likely what happened here.

    whether you were oversensitive or wether they behaved dickish (or both?) i can't really tell, but such questions are pretty common in help channels.

    (also: offended ubuntu user here :P )
  • 1
    @Condor "i feed on that", i love you XD

    But yeah, most linux channels are like that. I don't get how mailing lists are sort of functionals, while irc and such are full of that kind of people. Tens of of people asking how to install a printer or to write on a ntfs partition, and so on. I liked the "rtfm" answers of bsd channels better, to be honest. If anything, it was a way to keep a decent standard.
  • 3
    @soulsuke very true.. that's why I think that Linux should've remained a niche system. Sure it's better than Windows and people should have the right to install a system that they like regardless of their tech-savviness, but I don't want it to be infested with kiddies who brag about their shit just because they installed le Kelai Lenox or Ubuntu or whatever, and bully everyone else... It makes communities so toxic. BSD is still quite a niche system with the only thing where regular users are common I think is FreeNAS, which I wish that Linux would've remained too. I don't like Canonical's effort to make Linux accessible to the uncaring fucks called regular end users to be honest.

    @git-gud a little bit of both I think. I just don't like to be ridiculed by people for asking a question if it isn't on the toxic shitpile called the Stack Exchange - especially Ask Ubuntu. I'm fine with people not knowing the answer to my (rather rare because I use search engines) questions, but I don't want them to be trashtalked on just to feed someone else's ego. Trolls belong on Stack Overflow, Ask Ubuntu and /b/ only.
  • 2
    @EclipseMain because it's from a time when technology wasn't as dystopian as it is today, it's an open and simple protocol and best of all, an IRC client can run (and is running) on one of my servers, enabling it to stay online 24/7 🙂
  • 1
    @Condor Linux being a widely used OS is a great thing when it comes to hw support though. What really hurts, imho, is the ease to install it. While Windows, Mac and GUIs are considered "the norm", *nix and shell (including ncurses UIs) are 1337 h4x0r stuff. So every kid can install Debian derivates with a couple of clicks and use Facebook like a real hacker (maybe using Edge under Wine). I think there should be some kind of barrier to keep such people out of Linux tbh... If they can't use it and cba to learn, then they should stick to Windows/Mac.

    ...That's also why I moved to Arch, tbh. Most users are real dicks, but they do say something useful most of the times. Apparently, manual installations (even well documented ones) keep kids away.
  • 0
    @Condor why would I be offended? I have a life in the real world 👦

    Edit: should I bake you a cake ?

    Mandatory XKCD reference:
    https://xkcd.com/142/
  • 3
    @shaji Because "there are assholes in the Linux community" obviously doesn't mean that all of the Linux users are. It helps to not be offended by shit before verifying with the person you're offended with what they actually mean.

    As for having a life, what exactly do you mean by that statement? I hear it all the time from normies, calling me a nolifer because I spend so much time in front of those displays, interacting with all those turminels and (according to them) wasting my life. Which again doesn't imply that you are a normie, I'm just curious as to why you're saying that.

    And I'm not very interested in cakes, but thanks anyway :)
  • 0
    @Condor don't be so sensitive over a couple of zeros and ones man. Go out into the world once in a while. Then you'll realize that there's more to life than being right on the internet. Mandatory XKCD reference:

    https://xkcd.com/386/
    xkcd: Duty Calls
Add Comment