mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-22 04:56:30 +02:00
Add stdin
This commit is contained in:
parent
8fd831982e
commit
c537cab2da
30 changed files with 42 additions and 32 deletions
|
@ -14,13 +14,15 @@ epoch=$(date +%s%N)
|
|||
basepath="/var/lib/lxc/piston/rootfs"
|
||||
filepath="/tmp/$epoch/code.code"
|
||||
argpath="/tmp/$epoch/args.args"
|
||||
stdinpath="/tmp/$epoch/stdin.stdin"
|
||||
arg=$(basename $argpath)
|
||||
|
||||
# write arg file
|
||||
mkdir -p $basepath/tmp/$epoch
|
||||
chmod 777 $basepath/tmp/$epoch
|
||||
cat $2 > $basepath$filepath
|
||||
echo "${@:3}" > $basepath$argpath
|
||||
cat $3 > $basepath$argpath
|
||||
echo "${@:4}" > $basepath$argpath
|
||||
|
||||
# process incrementor
|
||||
exec 200>$dir/lockfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue