• 0 Posts
  • 26 Comments
Joined 2 years ago
cake
Cake day: July 17th, 2023

help-circle



  • Years ago I thought I was being smart encrypting my home dir on my Linux server. I found out the hard way this prevents remote login over ssh using public key encryption, as the .ssh dir is in the home dir, which is encrypted unless you are already logged in at the time! So every time I wanted to ssh in, I had to plug in a monitor and log in on the console first.



  • Checked exceptions require a function to declare the exceptions it can throw. The caller function must then catch and handle the exception, or the exception would bubble up a level, in which case the caller must also include that exception among the exceptions it declares that it can throw. I don’t know if C++ does this, but Java/C# do. It sounds exactly like Rust’s system except with different syntax.












  • That would only add one extra process instance with each call. The pipe makes it add 2 extra processes with each call, making the number of processes grow exponentially instead of only linearly.

    Edit: Also, Im not at a computer to test this, but since the child is forked in the background (due to &), the parent is free to exit at that point, so your version would probably just effectively have 1-2 processes at a time, although the last one would have a new pid each time, so it would be impossible to get the pid and then kill it before it has already replaced itself. The original has the same “feature”, but with exponentially more to catch on each recursion. Each child would be reparented by pid 1, so you could kill them by killing pid 1 i guess (although you dont want to do that… and there would be a few you wouldn’t catch because they weren’t reparented yet)