Process

Provides a framework for managing system processes

Technology

The process module provides comprehensive system process management capabilities for Project Forge applications. It enables spawning, monitoring, and controlling system processes with real-time output streaming and web-based administration.

Overview

This module provides:

⚠️ Security Note: This module is marked as dangerous because it allows executing arbitrary system commands. Use with caution and appropriate access controls.

Key Features

Process Management

Real-time Streaming

Web Interface

Performance & Safety

Usage

Basic Process Execution

 1
2
3
4
5
6
7
8
9
10
11
12
// Create a new exec service
execSvc := exec.NewService()

// Create and start a process
proc := execSvc.NewExec("echo", []string{"Hello, World!"}, "", nil)
err := proc.Start()
if err != nil {
return err
}

// Wait for completion
err = proc.Wait()

Web Interface

Navigate to /admin/exec to: 1. Create new processes with custom commands 2. Monitor running processes 3. View real-time output (with WebSocket support) 4. Terminate processes as needed

Real-time Monitoring

Include the websocket module to enable live output streaming:

1
2
<!-- Process detail view with WebSocket streaming -->
{%= components.RenderExecDetail(exec, ps) %}

Configuration

The process module uses standard Project Forge configuration patterns:

Dependencies

Required Modules

Recommended Modules

Security Considerations

⚠️ Important: This module allows execution of arbitrary system commands. Implement appropriate security measures:

Source Code

See Also