Running a fork bomb

Since it was Halloween and all, I shared an article with some scary Linux commands that one should never run to some of my colleagues. One of them was a fork bomb, which looks like this: :(){:|:&};: In Bash, a function is defined like so: function_name () { commands } So the fork bomb starts…

Continue Reading

Forking in Perl 2

Build up an index of files to process, e.g. SAM files. Fork out 16 child processes, each time processing and eliminating one file from the index. As with all my code, use at your own risk. Comments and suggestions always welcome. For more information see Forking in Perl.

Continue Reading

Forking in Perl

Foreach item in the array, start a fork. $pid returns 0 if it is the child process. This way you can spawn 4 child processes from one parent. This page explains it all and the code shown below is an adaptation of code shown from the link. I just added code to show the current…

Continue Reading