Commit Graph

97 Commits

Author SHA1 Message Date
Patrick Spendrin
b79701cefd do not build UnixProcessInfo on Windows 2013-11-26 21:00:10 +01:00
Kurt Hindenburg
08fb406533 Use cmake to check if we're on DragonFly BSD instead of __DragonFly__
builds on dragonfly 3.4-RELEASE DragonFly
2013-09-13 23:45:34 -04:00
Kurt Hindenburg
93186a2d53 On MacOSX setPid - strange I never notice this was missing before 2013-09-07 13:08:52 -04:00
Pino Toscano
f72af085ae ProcessInfo: isolate all the platform-specific *ProcessInfo implementations
compile all the platform-specific *ProcessInfo implementations only
in the OS they belong to, basically extending this conditional
compilation also to the Linux and Solaris implementations.

This allows to use proper OS-specific API/etc in each, removing quirks
(like the one for the Solaris psinfo struct) to emulate such APIs on
other OSes.
2013-08-01 16:53:06 +02:00
Kurt Hindenburg
86880dff46 Fix a minor krazy issue about dup #include 2013-07-12 10:27:02 -04:00
Kurt Hindenburg
f051b6cd20 minor style fixes
GIT_SILENT
2013-04-27 09:25:04 -04:00
Kurt Hindenburg
160ac87b59 Remove unnecessary Q_OS_MAC checks and includes
This compiles under 10.8.x - I don't have a 10.7 system to check
2013-04-13 15:39:42 -04:00
Kurt Hindenburg
2c686b7afe Minor warning fixes when running under FreeBSD 2013-02-23 10:00:25 -05:00
Kurt Hindenburg
983efbc5a8 Add braces around if/else for readability 2012-12-19 23:41:09 -05:00
Jekyll Wu
1a26982427 "#ifdef(XYZ)" -> "#if defined(XYZ)"
Use one form consistently in all code
2012-11-20 11:42:12 +08:00
Jekyll Wu
e245ac718c Revert "Refacotr and move the logic of parsing ssh command into a separate function"
This reverts commit 5a5fd23696.

This comes as one part of reverting all the work related with the
refactoring of the ssh command parser. That big refactoring commit
5a5fd236 causes some hard to debug crashes/problems. For the long term
benefit, reverting now and early is a good choice. I will try to redo the
refactoring in a better way for KDE SC 4.11, but for the upcoming 4.10
stability more important.
2012-11-12 00:09:41 +08:00
Jekyll Wu
62b08e79a7 Revert "Fix comment typo"
This reverts commit 726c52c4cf.

This comes as one part of reverting all the work related with the
refactoring of the ssh command parser. That big refactoring commit
5a5fd236 causes some hard to debug crashes/problems. For the long term
benefit, reverting now and early is a good choice. I will try to redo the
refactoring in a better way for KDE SC 4.11, but for the upcoming 4.10
stability more important.
2012-11-12 00:09:26 +08:00
Jekyll Wu
16f198f974 Revert "Remove one not-really-needed member variable"
This reverts commit c0079755eb.

This comes as one part of reverting all the work related with the
refactoring of the ssh command parser. That big refactoring commit
5a5fd236 causes some hard to debug crashes/problems. For the long term
benefit, reverting now and early is a good choice. I will try to redo the
refactoring in a better way for KDE SC 4.11, but for the upcoming 4.10
stability more important.
2012-11-12 00:09:12 +08:00
Jekyll Wu
dd03ff80d6 Revert "For SSH processes, return if no arguments are found."
This reverts commit 5e010083e9.

This comes as one part of reverting all the work related with the
refactoring of the ssh command parser. That big refactoring commit
5a5fd236 causes some hard to debug crashes/problems. For the long term
benefit, reverting now and early is a good choice. I will try to redo the
refactoring in a better way for KDE SC 4.11, but for the upcoming 4.10
stability more important.
2012-11-12 00:06:23 +08:00
Kurt Hindenburg
5e010083e9 For SSH processes, return if no arguments are found.
Without this, I'm getting crashes on my Mac box.
2012-11-10 16:11:18 -05:00
Jekyll Wu
c0079755eb Remove one not-really-needed member variable 2012-11-04 12:57:27 +08:00
Jekyll Wu
726c52c4cf Fix comment typo
SVN_SILENT
2012-11-04 12:53:44 +08:00
Jekyll Wu
5a5fd23696 Refacotr and move the logic of parsing ssh command into a separate function
That make the code easier to read and test, and also comes as a preparation for
writing parser for other remote connection commands, like mosh, dropbear, etc.
2012-11-04 12:17:30 +08:00
Jekyll Wu
659d2c60ae Add the support of gathering process information on OpenBSD
Thanks to Vadim Zhukov for providing the patch

FEATURE: 305362
REVIEW: 106129

FIXED-IN: 4.10.0
2012-10-18 04:17:32 +08:00
Kurt Hindenburg
569ffb37e4 remove kWarning 2012-06-18 09:16:18 -04:00
Kurt Hindenburg
1ce424142f Use readlink instead of QFileInfo to prevent non-responsive issues.
The current code using QFileInfo on the /proc/%pid/cwd and for some
situations, this may cause issues as QFileInfo hangs if unable to read that
file.  The new code uses readlink which appears to work w/o issue.

The Solaris  code needs fixed as well.

CCBUG: 251351
2012-06-18 08:56:11 -04:00
Jekyll Wu
a3b73317fd Small krazy fix for including header 2012-06-14 16:20:47 +08:00
Kurt Hindenburg
bee9aa8f78 minor style fixes - remove empty lines start/end code blocks 2012-05-13 10:08:05 -04:00
Jekyll Wu
fd11d1cccf Add missing ssh commandline options
The new options are take from the manual of openssh-6.0
2012-05-06 04:43:42 +08:00
Jekyll Wu
59c635f552 Add formatter %h which expands to local hostname in local session
Note: this %h is different from the %h which expands to remote hostname
in remote session.

REVIEW: 104490
2012-04-09 22:50:23 +08:00
Kurt Hindenburg
5b083640ce whitespace and style fixes
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00
Kurt Hindenburg
f28b60ba09 Fix crash for 'ssh -t localhost bash -l'
This needs to be handled better but for now stop crashing.

BUG: 297156
2012-03-30 21:21:56 -04:00
Kurt Hindenburg
519e2614d6 Style fixes - remove spaces before ; and add spaces in for loops 2012-03-18 15:11:06 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Kurt Hindenburg
c272fb2c15 Remove krazy lines 2012-03-08 23:16:44 -05:00
Kurt Hindenburg
8613e562ce -Wshadow fixes to parameter names and variable names (pid) 2012-03-07 09:48:49 -05:00
Jekyll Wu
ba8452e5c2 Ensure reading the CommonDirNames information only once.
It is problematic to use "isEmpty()" to check whether the information
has been read. That would defeat the purpose of reading it only once
when the user has explicitly set that list as empty.
2012-03-06 02:21:05 +08:00
Jekyll Wu
90469a094a Add more constness 2012-03-06 02:00:15 +08:00
Jekyll Wu
5a936adb20 Disable the advanced feature of "CommonDirNames" for "%d" by default
The main consideration is it is more often confusing than helpful for
average users, especially when this feature was hidden, undocumented and
enabled by default.

The "CommonDirNames" list in the code is now empty by default , instead
of a list of hardcoded common names.

To enable and customize this advanced and potentally confusing feature,
edit $KDEHOME/usr/share/config/konsolerc and add the following lines:

    [ProcessInfo]
    CommonDirNames=name1,name2,name3...

For konsolepart users, edit the config file of the hosting application.

I'll add related information for this hidden & advanced feature into
handbook later.

BUG:190281
FIXED-IN:4.9.0

REVIEW: 103949
CCMAIL: robertknight@gmail.com
2012-02-26 04:14:27 +08:00
Jekyll Wu
f42fd4721b Clean up unneeded #includes 2012-02-20 19:41:38 +08:00
Jekyll Wu
97ce14afef Remove code for tab title formatter %c and %C.
Those two formatters have never been actually implemented or revealed to
users. It is quite hard to infer what they are supposed to do based upon
exising code and commit history
2012-02-13 06:21:28 +08:00
Jekyll Wu
5cf3b4fa00 Remove dead code 2012-02-12 18:27:33 +08:00
Kurt Hindenburg
6d31f70160 Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 11:03:54 -05:00
Jekyll Wu
125e2c7bd2 Declare pointer and reference in a consistent way
Most code use the "const QString& text" form, instead of the "const
QString &text" form. So change the minority to be consistent with
the majority.
2011-11-06 06:13:28 +08:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Jekyll Wu
1772401647 Rename for consistency
In '-p 2222', -p is the option and 2222 is its argument.

noOptionsArguments   ==> noArgumentOptions
singleOptionArguments ==> singleArgumentOptions
argChar ==> optionChar
2011-09-09 23:10:13 +08:00
Jekyll Wu
c4ab3d6c6d Make the parsing of ssh command more robust, or more complicated.
It now can deal with both '-p 2222' and '-p2222'.

This is a follow up of 869cdb1090

CCBUG: 281621
2011-09-09 21:23:12 +08:00
Jekyll Wu
e828def700 Reorgnazie some #include. 2011-09-06 06:53:38 +08:00
Jekyll Wu
869cdb1090 support -p port in ssh command for specifying non-default port. 2011-08-21 09:17:42 +08:00
Jekyll Wu
cc36502516 make %u work for ssh connection where '-l user' is used .
FEATURE: 197345
FIXED-IN: 4.8
2011-08-20 23:07:43 +08:00
Jekyll Wu
967c927b04 Disables the code for replacing the %c and %C formatter.
%c and %C are not implemented yet, and are unkonwn to users.
2011-08-20 19:34:35 +08:00
Jekyll Wu
20e9274943 Fix a hidden bug which makes argument list grow longer for ever.
The old code updates the argument list when it is asked to refresh
process info, but it calls ProcessInfo::addArgument() without ever
clearing existing arguements first. This means the argument list will
grow longer and longer for ever. For a long-running shell session in
which user has executed thousands of commands, that will waste quite
amount of memory, not to metion the logic error itself.

The reaseon why this bug keeps hidden is that the %c and %C formatter
have never been revealed to users, which are not implemented yet.
2011-08-20 19:23:17 +08:00
Kurt Hindenburg
f5feeba821 Check getpwuid_r return value. 2011-04-02 17:43:56 -04:00
Kurt Hindenburg
cacfb081bb Use KDE::'s stat and chmod 2011-04-01 10:37:53 -04:00
Kurt Hindenburg
e865acedb8 Add cwd support for DragonFly. Patch by Alex Hornung.
It compiles under Linux.

BUG: 259970

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1210984
2011-01-02 21:13:06 +00:00