sudokill

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.5 - Auxiliary function
Introduced first in SolidGeometry 4.5, Creation date: 2019-03-22, Last change: 2025-07-20

shows details on a process and kills it


Only for toolbox developer (2025-08-09) - Not intended to be released


See Also: whoisIP , whoisPID , lastlogins , whoislaunched , whoisTCP , whoislaunchagent

Example Illustration

 missing image of sudokill(pid,cmd)

Syntax

sudokill(pid,[cmd])

Input Parameter

pid: pid number or string
cmd: explicit kill command if desired

Examples


sudokill ('111')
sudokill ('111,'kill')





Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

The function sudokill is designed to display details about a process and optionally terminate it. It is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Algorithm Steps

  1. The function checks if the pid is a string. If it is, it converts it to a number using str2double.
  2. The function retrieves the command from the optional parameters using getfuncparams. If no command is provided, it defaults to an empty array.
  3. A system command is constructed using sprintf to display process details with ps auxww for the given pid.
  4. The system command is executed using system to show the process details.
  5. If the cmd is equal to 'kill', the function attempts to terminate the process:
Algorithm explaination created using ChatGPT on 2025-08-19 06:42. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-08-09