stupefydeveloper.blogspot.com
stupefy developer: linux: semget across the processes
http://stupefydeveloper.blogspot.com/2009/03/linux-semget-across-processes.html
Blog about software development, *nix and anything that is related to that. Tuesday, March 31, 2009. Linux: semget across the processes. Recently I've written an issue. On whether the semaphore handle obtained with sem open is valid in children processes. To make the picture complete I'd like to describe is it possible to pass semaphore handle to children processes obtained by IXS's semget. Test Child 3353 waiting for semaphore(0). Parent 3352 setting semaphore(0). Child: Done Parent: Set. Since semaphor...
stupefydeveloper.blogspot.com
stupefy developer: *nix: crash-safe rw-lock with semaphores
http://stupefydeveloper.blogspot.com/2009/05/nix-crash-safe-rw-lock-with-semaphores.html
Blog about software development, *nix and anything that is related to that. Tuesday, May 5, 2009. Nix: crash-safe rw-lock with semaphores. In previous post about rw-locks based on semaphores I've introduced rw-lock mechanism to limit readers. This post introduces crash-safe implementation of rw-locks. The implemlementation doesn't take into account bad application design. It doesn't detect deadlocks however this is not hard to implement when you get the main idea. Knowing all these I want the whole appli...
stupefydeveloper.blogspot.com
stupefy developer: linux: creation of the new process
http://stupefydeveloper.blogspot.com/2009/06/linux-creation-of-new-process.html
Blog about software development, *nix and anything that is related to that. Monday, June 15, 2009. Linux: creation of the new process. System developers know that you need fork. System call to start a new process and execve. System call to start a new program. While fork. Creates a copy of the current process(actually not a complete copy - please refer to the man page of fork to get information what is being duplicated and currently COW is used to postpone the copying of the memory regions), execve.
stupefydeveloper.blogspot.com
stupefy developer: urxvt: 256 colors in ubuntu
http://stupefydeveloper.blogspot.com/2010/06/urxvt-256-colors-in-ubuntu.html
Blog about software development, *nix and anything that is related to that. Friday, June 4, 2010. Urxvt: 256 colors in ubuntu. Unfortunately Ubuntu has rxvt-unicode package without full 256 colors support. The easiest way is to rebuild the package manually. Following steps describe how to do that easily:. Apt-get source rxvt-unicode $ cd rxvt-unicode-9.06. Apply 256 color patch that could be already found in the package:. Now you should checkout build dependencies and build the package:.
stupefydeveloper.blogspot.com
stupefy developer: c: double exclamation
http://stupefydeveloper.blogspot.com/2009/09/c-double-exclamation.html
Blog about software development, *nix and anything that is related to that. Monday, September 21, 2009. Linux kernel is full of fascinating code. Not all of it is good but it's possible to find something interesting. While reading the kernel code I've seen a lot of conditional expressions that contain double exclamations. Something like:. I was curious what's the purpose of such expression. And I've found that mostly this is used to make compiler happy and quite. Double exclamation or simply '! In C inte...
stupefydeveloper.blogspot.com
stupefy developer: c/c++: call stack v.2
http://stupefydeveloper.blogspot.com/2009/09/cc-call-stack-v2.html
Blog about software development, *nix and anything that is related to that. Tuesday, September 29, 2009. C/c : call stack v.2. In previous c/c : call stack. Article I wrote about obtaining function call stack. The method described in the article is good enough but it is linux-specific. There's no similar solutions out-of-box in other *nix-like operation systems as far as I know. This time I would like to discuss more generic way. At list it is available for the code compiled with gcc. The resulting funct...
stupefydeveloper.blogspot.com
stupefy developer: emacs: proper kill-whole-line
http://stupefydeveloper.blogspot.com/2009/04/emacs-proper-kill-whole-line.html
Blog about software development, *nix and anything that is related to that. Tuesday, April 14, 2009. I'm using emacs not for a long time but I really liked it. It took not much time to get used to it. Though emacs doesn't have some function you are free to write them in elisp easily! I used to vim's 'dd' command which kills current line and later you are able to yank it. Defun kill-total-line () (interactive) (let ( kill-whole-line t) (beginning-of-line) (kill-line) (setq top (car kill-ring) (setq last (...
stupefydeveloper.blogspot.com
stupefy developer: September 2009
http://stupefydeveloper.blogspot.com/2009_09_01_archive.html
Blog about software development, *nix and anything that is related to that. Tuesday, September 29, 2009. C/c : call stack v.2. In previous c/c : call stack. Article I wrote about obtaining function call stack. The method described in the article is good enough but it is linux-specific. There's no similar solutions out-of-box in other *nix-like operation systems as far as I know. This time I would like to discuss more generic way. At list it is available for the code compiled with gcc. The resulting funct...
stupefydeveloper.blogspot.com
stupefy developer: linux: how to become a real daemon?
http://stupefydeveloper.blogspot.com/2009/04/linux-how-to-become-real-daemon.html
Blog about software development, *nix and anything that is related to that. Tuesday, April 21, 2009. Linux: how to become a real daemon? When you want to write a daemon - a program that runs in background and serves during all the time that machine run(or almost all the time) you there are few things that's better to remember. In linux(and maybe in some other OSes) lately CLOCAL is usually set but the developer shouldn't rely on this. There are few ways to detach from the controlling terminal. From its c...