Skip to content

Validation: No timeout on Python subprocess, long-running processes can hang Electron app indefinitely #207

@anshul23102

Description

@anshul23102

Problem

spawn() called without timeout. Long-running or hanging scripts freeze app.


Recommended Solution

Add process timeout:

const proc = spawn(pythonCmd, args);
const timeout = setTimeout(() => {
  proc.kill('SIGTERM');
}, 30000);  // 30 second timeout

proc.on('exit', () => clearTimeout(timeout));

Program Template

  • GSSoC '26

Suggested Labels

reliability, subprocess, timeout, gssoc-eligible
EOF
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions