lib/Tools/mkfifo
author wenzelm
Thu, 24 Jun 2010 14:31:01 +0200
changeset 37528 42804fb5dd92
parent 29143 72c960b2b83e
child 38253 3d4e521014f7
permissions -rwxr-xr-x
slightly more standard data merge: Symtax.merge (K true) avoids equality on abstract type Pretty.T and gracefully accepts overriding, Symtab.join prefers first entry as usual;

#!/usr/bin/env bash
#
# Author: Makarius
#
# DESCRIPTION: create named pipe


PRG="$(basename "$0")"

function usage()
{
  echo
  echo "Usage: isabelle $PRG"
  echo
  echo "  Create a temporary named pipe and return its name."
  echo
  exit 1
}

function fail()
{
  echo "$1" >&2
  exit 2
}


## main

[ "$#" != 0 ] && usage

FIFO="/tmp/isabelle-fifo$$"
mkfifo -m 600 "$FIFO" || fail "Failed to create named pipe $FIFO"
echo "$FIFO"