[haiku-commits] r39451 - haiku/trunk/src/apps/terminal

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 16 Nov 2010 19:46:08 +0100 (CET)

Author: bonefish
Date: 2010-11-16 19:46:08 +0100 (Tue, 16 Nov 2010)
New Revision: 39451
Changeset: http://dev.haiku-os.org/changeset/39451

Modified:
   haiku/trunk/src/apps/terminal/Shell.cpp
   haiku/trunk/src/apps/terminal/Shell.h
   haiku/trunk/src/apps/terminal/TermView.cpp
   haiku/trunk/src/apps/terminal/TermView.h
Log:
Added ActiveProcessGroup() getter to Shell and TermView.


Modified: haiku/trunk/src/apps/terminal/Shell.cpp
===================================================================
--- haiku/trunk/src/apps/terminal/Shell.cpp     2010-11-16 18:19:28 UTC (rev 
39450)
+++ haiku/trunk/src/apps/terminal/Shell.cpp     2010-11-16 18:46:08 UTC (rev 
39451)
@@ -231,6 +231,13 @@
 }
 
 
+pid_t
+Shell::ActiveProcessGroup() const
+{
+       return tcgetpgrp(fFd);
+}
+
+
 bool
 Shell::HasActiveProcesses() const
 {

Modified: haiku/trunk/src/apps/terminal/Shell.h
===================================================================
--- haiku/trunk/src/apps/terminal/Shell.h       2010-11-16 18:19:28 UTC (rev 
39450)
+++ haiku/trunk/src/apps/terminal/Shell.h       2010-11-16 18:46:08 UTC (rev 
39451)
@@ -44,6 +44,7 @@
                        int                                     FD() const;
                        pid_t                           ProcessID() const       
{ return fProcessID; }
 
+                       pid_t                           ActiveProcessGroup() 
const;
                        bool                            HasActiveProcesses() 
const;
 
        virtual status_t                        AttachBuffer(TerminalBuffer* 
buffer);

Modified: haiku/trunk/src/apps/terminal/TermView.cpp
===================================================================
--- haiku/trunk/src/apps/terminal/TermView.cpp  2010-11-16 18:19:28 UTC (rev 
39450)
+++ haiku/trunk/src/apps/terminal/TermView.cpp  2010-11-16 18:46:08 UTC (rev 
39451)
@@ -628,6 +628,13 @@
 }
 
 
+pid_t
+TermView::ActiveProcessGroup() const
+{
+       return fShell != NULL ? fShell->ActiveProcessGroup() : -1;
+}
+
+
 bool
 TermView::IsShellBusy() const
 {

Modified: haiku/trunk/src/apps/terminal/TermView.h
===================================================================
--- haiku/trunk/src/apps/terminal/TermView.h    2010-11-16 18:19:28 UTC (rev 
39450)
+++ haiku/trunk/src/apps/terminal/TermView.h    2010-11-16 18:46:08 UTC (rev 
39451)
@@ -46,6 +46,7 @@
 
        virtual void                    GetPreferredSize(float* _width, float* 
_height);
 
+                       pid_t                   ActiveProcessGroup() const;
                        bool                    IsShellBusy() const;
 
                        const char*             TerminalName() const;
@@ -73,7 +74,7 @@
                        BScrollBar*             ScrollBar() const { return 
fScrollBar; };
 
                        void                    SetMouseClipboard(BClipboard *);
-                       
+
        virtual void                    SetTitle(const char* title);
        virtual void                    NotifyQuit(int32 reason);
 
@@ -95,7 +96,7 @@
 
                        void                    DisableResizeView(int32 
disableCount = 1);
        static  void                    AboutRequested();
-       
+
 protected:
        virtual void                    AttachedToWindow();
        virtual void                    DetachedFromWindow();


Other related posts:

  • » [haiku-commits] r39451 - haiku/trunk/src/apps/terminal - ingo_weinhold