Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
add pid to log
Browse files Browse the repository at this point in the history
  • Loading branch information
rs committed Dec 18, 2013
1 parent 7e7ae26 commit 59b9628
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash

me=$(readlink -f $0)

abspath=$(which abspath)
if [ "$abspath" = "" ]; then
abspath="readlink -f"
fi

me=$($abspath $0)
parent=$(dirname $me)
distname=$(basename $parent)

Expand Down
4 changes: 3 additions & 1 deletion src/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
DEBUG=0

def log(msg):
sys.stderr.write('backend: %s\n' % msg)
sys.stderr.write('backend (%s): %s\n' % (os.getpid(), msg))


def write(*l):
args=len(l)
Expand All @@ -24,6 +25,7 @@ def write(*l):
sys.stdout.write('\n')
sys.stdout.flush()


def get_next():
if DEBUG: log('reading now')
l = sys.stdin.readline()
Expand Down

0 comments on commit 59b9628

Please sign in to comment.