London – Ivan Pesin https://pesin.space/blog Articles & Translations Wed, 19 Oct 2016 02:08:18 +0000 en-US hourly 1 https://wordpress.org/?v=5.1.1 Links: Oct 27 /blog/2013/10/links-oct-27/?utm_source=rss&utm_medium=rss&utm_campaign=links-oct-27 Sun, 27 Oct 2013 18:40:46 +0000 https://pesin.space/blog/2013/10/links-oct-27/

This has been a busy month and, what pleases me, very productive. Apple’s recent announcement managed to surprise in many ways, which is delightful as well; if you’re still on Mountain Lion consider upgrading, Mavericks got it right in so many places, that it’s even difficult to tell which changes are most compelling.

I’ve lagged on links, however, so catching up:

Technology

openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem \
   -out cert.pem -days 356

1. fork (first time) -- so we aren't a group leader, and let 
   the parent exit.
2. call setsid() -- to become leader of a new session. 
   This call only works if we are not a group leader. 
   This new session has no controlling terminal.
3. fork (second time) -- so we aren't a session leader 
   (and thus can't regain a controlling terminal), and let 
   the parent exit.
4. cd to root directory -- so we don't prevent other directories 
   from being umount-ed.
5. set umask to desired value (optional) -- because we could've 
   inherited a mask we didn't want.
6. close stdin, stdout, stderr (or just reopen them to point elsewhere)

  • What nohup does:

- If stdout and stderr are connected to a terminal, 
  redirects them to nohup.out
- ignores SIGHUP

  • Query against over 1500 global DNS servers

English

Other

  • I’ve finally found where the phrase “With sufficient thrust, pigs fly just fine” comes from! Appears it’s from RFC1925:

(3) With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead.

But references to flying pigs appear even in Lewis Carrol’s Alice:

"Thinking again?" the Duchess asked, with another dig of her sharp little chin.
"I've a right to think," said Alice sharply, for she was beginning to feel a little worried.
"Just about as much right," said the Duchess, "as pigs have to fly...." — Alice's Adventures in Wonderland, Chapter 9.


 

]]>