)]}'
{
  "commit": "4c44561d9f97331bb23f900f47a69305091f3ab3",
  "tree": "f1cd0d1497ec8866b739fb6616c1753256993a36",
  "parents": [
    "842050da1c14d7dbe365cd750032fcd8eaaa1db2"
  ],
  "author": {
    "name": "Harald van Dijk",
    "email": "harald@gigawatt.nl",
    "time": "Fri Sep 26 22:27:13 2014 +0800"
  },
  "committer": {
    "name": "Herbert Xu",
    "email": "herbert@gondor.apana.org.au",
    "time": "Fri Sep 26 22:27:13 2014 +0800"
  },
  "message": "[JOBS] Fix off-by-one error for multiple of four job numbers\n\nOn 29/07/13 23:44, Luigi Tarenga wrote:\n\u003e hi list,\n\u003e while writing a script to execute parallel ssh command on many host I found\n\u003e a strange behavior of dash. I can replicate it with a very simple script but\n\u003e didn\u0027t find any documentation about dash or POSIX that can explain it.\n\u003e \n\u003e tested on centos 6.4 (dash 0.5.5.1) and wih dash compiled from source (0.5.7)\n\u003e the following script reports error:\n\u003e \n\u003e #!/bin/dash\n\u003e \n\u003e sleep 3 \u0026\n\u003e sleep 3 \u0026\n\u003e sleep 3 \u0026\n\u003e sleep 3 \u0026\n\u003e \n\u003e #/bin/true\n\u003e jobs -l\n\u003e \n\u003e wait %1\n\u003e wait %2\n\u003e wait %3\n\u003e wait %4\n\u003e \n\u003e [vortex@lizard ~]$ ./dash-0.5.7/src/dash test.sh\n\u003e [4] + 4569 Running\n\u003e [3] - 4568 Running\n\u003e [2]   4567 Running\n\u003e [1]   4566 Running\n\u003e prova: 14: wait: No such job: %4\n\u003e [vortex@lizard ~]$ echo $?\n\u003e 2\n\nYes, this looks like a bug to me. The number of allocated jobs is always\nkept as a multiple of four, and the first check in considering whether\nthe job number is valid is \"if it\u0027s greater than or equal to the number\nof allocated job, it\u0027s invalid\". That doesn\u0027t look right. That would\nonly be right if jobs were zero-based, but they aren\u0027t. If it\u0027s exactly\nequal to the number of available jobs, it can still be valid. It works\nwhen adding /bin/true, because four more more jobs end up allocated\ninternally.\n\nSigned-off-by: Herbert Xu \u003cherbert@gondor.apana.org.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ba67b6ecc5c23300018887ad073174c7d5dfbc69",
      "old_mode": 33188,
      "old_path": "ChangeLog",
      "new_id": "7b67c0c61732158e3cad23f67f82cf57d08fc4dc",
      "new_mode": 33188,
      "new_path": "ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "bf40204fdfd7c4df3ca2d6000d07ddf98060e232",
      "old_mode": 33188,
      "old_path": "src/jobs.c",
      "new_id": "c2c2332a25fa509a32ddc1b2603528d7f123e95b",
      "new_mode": 33188,
      "new_path": "src/jobs.c"
    }
  ]
}
