Skip to content

Instantly share code, notes, and snippets.

@stetro
stetro / rcanalyse.sh
Created June 4, 2012 15:17 — forked from stetro/rcanalyse.sh
Analyse Shellskript für Piss Pott mit Racecondition (https://gist.github.com/gists/2851948)
#!/bin/bash
#GNUPLOT WIRD BENOETIGT !!!!
#Getestete Ausgabe:
# RaceCondition Verhalten
#
# 30 ++------------+-------------+-------------+-------------+------------++
# ******** + + Raceconditions zu Wartezeit ****** +
# | * : : + + |
# 25 ++......*............................................................++
@stetro
stetro / pisspott1.c
Created June 4, 2012 15:17 — forked from stetro/pisspott1.c
Piss Pott mit raceconditions
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/wait.h>
#define MAXCOUNT ((FUSS_B+FUSS_A)*17)
#define FUSS_B 15.51337
@stetro
stetro / pisspott2.c
Created June 4, 2012 15:16 — forked from stetro/pisspott2.c
Piss Pott Ohne Raceconditions mit Semaphoren
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/wait.h>
#include <errno.h>
#include <string.h>