---
name: "processman"
section: "3tcl"
platform: "linux"
package: "tcllib"
version: "2.0+dfsg-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/processman"
---

# processman(3tcl)

Tool for automating the period callback of commands

```

```

## NAME

processman - Tool for automating the period callback of commands

## SYNOPSIS

package require **Tcl 8.5 9**

package require **twapi 3.1**

package require **cron 1.1**

package require **processman ?0.8?**

**::processman::find\_exe** *name*

**::processman::kill** *id*

**::processman::kill\_all**

**::processman::killexe** *name*

**::processman::onexit** *id* *cmd*

**::processman::priority** *id* *level*

**::processman::process\_list**

**::processman::process\_list** *id*

**::processman::spawn** *id* *cmd* *args*

```

```

## DESCRIPTION

The **processman** package provides a Pure-tcl set of utilities to manage child processes in a platform-generic nature.

## COMMANDS

- **::processman::find\_exe** *name*

  Locate an executable by the name of *name* in the system path. On windows, also add the .exe extention if not given.

- **::processman::kill** *id*

  Kill a child process *id*.

- **::processman::kill\_all**

  Kill all processes spawned by this program

- **::processman::killexe** *name*

  Kill a process identified by the executable. On Unix, this triggers a killall. On windows, **twapi::get\_process\_ids** is used to map a name one or more IDs, which are then killed.

- **::processman::onexit** *id* *cmd*

  Arrange to execute the script *cmd* when this programe detects that process *id* as terminated.

- **::processman::priority** *id* *level*

  Mark process *id* with the priorty *level*. Valid levels: low, high, default.

  On Unix, the process is tagged using the **nice** command.

  On Windows, the process is modifed via the **twapi::set\_priority\_class**

- **::processman::process\_list**

  Return a list of processes that have been triggered by this program, as well as a boolean flag to indicate if the process is still running.

- **::processman::process\_list** *id*

  Return true if process *id* is still running, false otherwise.

- **::processman::spawn** *id* *cmd* *args*

  Start a child process, identified by *id*. *cmd* is the name of the command to execute. *args* are arguments to pass to that command.

## BUGS, IDEAS, FEEDBACK

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category *odie* of the *Tcllib Trackers* \[http://core.tcl.tk/tcllib/reportlist\]. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide *unified diffs*, i.e the output of **diff -u**.

Note further that *attachments* are strongly preferred over inlined patches. Attachments can be made by going to the **Edit** form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

## KEYWORDS

odie, processman

## CATEGORY

System

## COPYRIGHT

```
Copyright (c) 2015 Sean Woods <yoda@etoyoc.com>
```
