Bug 15012 - koha-shell raises " no job control in shell" error
Summary: koha-shell raises " no job control in shell" error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 11775 14901 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-14 13:44 UTC by Jonathan Druart
Modified: 2016-06-21 21:38 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15012: use sudo instead of su in koha-shell (1.63 KB, patch)
2015-10-14 13:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15012: use sudo instead of su in koha-shell (1.88 KB, patch)
2015-10-14 13:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 15012: use sudo instead of su in koha-shell (1.93 KB, patch)
2015-10-22 02:54 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-10-14 13:44:46 UTC
vagrant@kohadevbox:kohaclone(master)$ sudo koha-shell kohadev
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
kohadev-koha@kohadevbox:/home/vagrant/kohaclone
Comment 1 Jonathan Druart 2015-10-14 13:48:17 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-10-14 13:54:19 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2015-10-14 13:55:31 UTC
*** Bug 14901 has been marked as a duplicate of this bug. ***
Comment 4 Tomás Cohen Arazi 2015-10-14 13:56:03 UTC
*** Bug 11775 has been marked as a duplicate of this bug. ***
Comment 5 Robin Sheat 2015-10-15 03:46:19 UTC
This looks like it could be good. Seems faster than waiting on whoever to fix su, anyway.
Comment 6 Robin Sheat 2015-10-22 02:54:13 UTC
Created attachment 43727 [details] [review]
Bug 15012: use sudo instead of su in koha-shell

Not sure this is the best way to fix it but it looks to work.

Test plan:
  sudo koha-shell kohadev
should not return any error
Without this patch, you should get
  bash: cannot set terminal process group (-1): Inappropriate ioctl for device
  bash: no job control in this shell

Confirm that other options work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Tested on kohadevbox:ansible.
KOHA_CONF and PERL5LIB are correctly set on the child shell.
Bonus point: koha-shell doesn't die if the user issues Ctrl+C to abort an execution.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Comment 7 Tomás Cohen Arazi 2015-10-22 03:05:06 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 8 Chris Cormack 2015-10-24 08:35:11 UTC
Pushed to 3.20.x will be in 3.20.5
Comment 9 Liz Rea 2015-11-02 21:14:39 UTC
Pushed to 3.18.x, is in 3.18.12.