Bug 208003 - shells/lshell: connection closed after one command
Summary: shells/lshell: connection closed after one command
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2016-03-15 03:58 UTC by Ignace Mouzannar
Modified: 2016-08-19 04:24 UTC (History)
1 user (show)

See Also:

patch solving the connection closing (641 bytes, patch)
2016-03-15 03:58 UTC, Ignace Mouzannar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ignace Mouzannar 2016-03-15 03:58:27 UTC
Created attachment 168197 [details]
patch solving the connection closing


Users running FreeBSD 10.{0,2}-RELEASE with the lshell-0.9.16 package have reported a bug upstream that lshell exited after only one command. I have successfully reproduced the bug on a vagrant FreeBSD 10.2-RELEASE box (thanks for making the FreeBSD vagrant box available). Unfortunately, this makes the lshell package unusable on FreeBSD. 

This issue can be easily fixed by applying the following (and attached) patch or by upgrading the package to the latest version 0.9.18 [1].

--- shellcmd.py.bak     2016-03-15 03:35:36.718063000 +0000
+++ shellcmd.py 2016-03-15 03:36:06.377039000 +0000
@@ -134,7 +134,7 @@
                 self.g_arg = ' '.join(self.g_line.split()[1:])
-                os.system('set -m; %s' % self.g_line)
+                os.system('%s' % self.g_line)
         elif self.g_cmd not in ['', '?', 'help', None]: 
             self.log.warn('INFO: unknown syntax -> "%s"' %self.g_line)
             self.stderr.write('*** unknown syntax: %s\n' %self.g_cmd)

You will find more info on the bug in the upstream report:

 Ignace M

[1] https://github.com/ghantoos/lshell/releases/tag/0.9.18
Comment 1 commit-hook freebsd_committer 2016-08-19 04:24:35 UTC
A commit references this bug:

Author: marino
Date: Fri Aug 19 04:23:33 UTC 2016
New revision: 420446
URL: https://svnweb.freebsd.org/changeset/ports/420446

  shells/lshell: Fix immediate exit after first command

  Without this fix, using lshell is impractical as the shell exits after
  the first command is executed.

  PR:		208003
  Submitted by:	Ignace Mouzannar

Comment 2 John Marino freebsd_committer 2016-08-19 04:24:59 UTC