Bug 208003

Summary: shells/lshell: connection closed after one command
Product: Ports & Packages Reporter: Ignace Mouzannar <mouzannar>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: marino
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch solving the connection closing none

Description Ignace Mouzannar 2016-03-15 03:58:27 UTC
Created attachment 168197 [details]
patch solving the connection closing

Hello,

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:])
                 self.cd()
             else:
-                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:
https://github.com/ghantoos/lshell/issues/92

Cheers,
 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

Log:
  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

Changes:
  head/shells/lshell/Makefile
  head/shells/lshell/files/patch-lshell_shellcmd.py
Comment 2 John Marino freebsd_committer 2016-08-19 04:24:59 UTC
Thanks!