Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ksl

ksl demo

sl never survives SIGKILL. This one runs in kernel space.

Why

The original sl is a small punishment for typing ls as sl: once it starts, even Ctrl-C does not save you.

ksl takes that joke one step further. You cannot ignore SIGKILL in userspace, so this project implements sl as a Linux kernel module and runs the animation directly from a kernel syscall context.

Once triggered, the train keeps going. The userspace caller cannot escape it. The animation runs inside the kernel and writes directly to the controlling TTY.

Features

  • Exposes the train through /dev/sl
  • Supports -a, -F, -l, and -c
  • Renders directly from kernel space (no userspace process involved)
  • The calling process is trapped once triggered

Build

Build the module the normal way:

make

If your target kernel build tree lives elsewhere:

make KDIR=/path/to/linux/build

Load

Load the module and make sure the device shows up:

sudo insmod ksl.ko
ls -l /dev/sl

ksl registers /dev/sl as a misc device. Once that exists, the train is ready.

Run

Use the helper script if you want something command-shaped:

./ksl
./ksl -a
./ksl -F
./ksl -l
./ksl -c

Or talk directly to the kernel and write options to the device yourself:

echo 'aF' > /dev/sl

Known Limitation

If you start multiple instances on the same TTY, the display may get garbled. That is not a bug so much as the natural consequence of putting sl in the kernel and then making poor life choices.

About

An unkillable `sl`, implemented as a Linux kernel module.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages