A better version of the linuxvcs unit
Original Reporter info from Mantis: lyda
-
Reporter name: Kevin Lyda
Original Reporter info from Mantis: lyda
- Reporter name: Kevin Lyda
Description:
The linux vcsh unit needs to be a bit more robust in how it processes /proc/PID/stat files. The issue is that the second field is "(argv[0])" and argv[0] can be anything. It can have spaces in it, it can have ") " in it, whatever.
The third field is an uppercase letter. All remaining fields are numbers.
The enclosed code will parse backwards, storing the numbers until it reaches a letter. At that point it starts to pull out the data.
The best part is that the code is slightly shorter than the code that currently exists and is broken.
Steps to reproduce:
Run any pascal program that uses the keyboard unit inside of tmux. It will immediately crash.
Mantis conversion info:
- Mantis ID: 35596
- OS: linux / unix
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 42766 (#ee6c426e).
- Monitored by: » tangentstorm (michal wallace)
- Target version: 3.2.0