Skip to content

Repo to hold byte sized programs on various interesting topics.

Notifications You must be signed in to change notification settings

sheharyaar/byte-sized-programs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This repository contains standalone programs to demonstrate a feature or concept.

List of Programs

  1. unshare

    1. unshare-files: demonstrates CLONE_FILES flag for unshare. This flag creates a seperate copy of descriptor table so that the other processes doen't affect the file descriptors on this one.
    2. unshare-fs: demonstrates CLONE_FS flag for unshare. This flag seperates current working directory, directory attributes, etc. from other processes.
    3. unshare-pid: demonstrates CLONE_NEWPID flag for unshare. This flag creates the first child process to pid 1 which acts as init for that namespace.
  2. gcc-attributes

    1. constructor.c: demonstrated the use of constructor and destructor GCC attributes.
    2. constructor-hook.c: expands on the previous example to use constructor with LD_PRELOAD to hook libc function.
    3. noreturn.c: demonstrates noreturn GCC attribute and C11 feature.
    4. unused.c: demonstrates unused GCC attribute.

About

Repo to hold byte sized programs on various interesting topics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages