Changeset 237


Ignore:
Timestamp:
Oct 19, 2009, 11:40:49 PM (11 years ago)
Author:
zerodeux
Message:

0.2 - fixes minor bug and adds some security

Location:
jobq
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • jobq/CHANGES

    r236 r237  
    22
    33        * Fix 'cat: .runner: No such file or directory' error
     4        * Basic security (creating queue dir as user-private)
    45
    56jobq 0.1
  • jobq/debian/changelog

    r236 r237  
     1jobq (0.2-1) stable; urgency=low
     2
     3  * Upstream update.
     4
     5 -- Vincent CARON <vcaron@bearstech.com>  Mon, 19 Oct 2009 23:36:34 +0200
     6
    17jobq (0.1-1) stable; urgency=low
    28
  • jobq/debian/docs

    r236 r237  
     1CHANGES
    12COPYING
     3TODO
  • jobq/jobq

    r236 r237  
    3737add_job() {
    3838  set -e
    39   mkdir -p $JOBPATH/$queue
     39  mkdir -m 0700 -p $JOBPATH/$queue
    4040  cd $JOBPATH/$queue
    4141
     
    5656    job=`ls -1rt 2>/dev/null | head -n1`
    5757
    58     if [ x"$job" != x ]; then
     58    if [ -n "$job" ]; then
    5959      cmd=`cat $job`         # content of job file, the commande to run
    6060      job=`basename "$job"`  # job ID
     
    8484
    8585    pidfile=.runner
    86     if kill -0 `cat $pidfile 2>/dev/null` 2>/dev/null; then
     86    pid=`cat $pidfile 2>/dev/null`
     87    if kill -0 "$pid" 2>/dev/null; then
    8788        # OK, queue runner is alive for this queue
    8889        exit 0
Note: See TracChangeset for help on using the changeset viewer.